htaccess重定向取决于/之后的文本


htaccess redirect depending on text after /

我有一个与.htaccess相关的问题,需要帮助重定向。

我有一个目录,我在其中保存了多个其他目录,其中一个是我的网站目录。

我的.htaccess文件已经设置为默认进入我的网站所在的子目录,并显示url,就好像它不在子目录中一样,即"reinhards.co/",而不是"reinhads.co/renhards.co"

# BEGIN WordPress
# In Root directory
# WPhtC: Disable directory browsing
Options All -Indexes
RewriteCond %{HTTP_HOST} ^(www.)?reinhards.co$
RewriteCond %{REQUEST_URI} !^/reinhards.co/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /reinhards.co/$1
RewriteCond %{HTTP_HOST} ^(www.)?reinhards.co$
RewriteRule ^(/)$ reinhards.co/index.php [L]
# END WordPress

然而,当有人输入时,我需要发生以下情况:

reinhards.co/xxxx

重定向到reinhards.co/renhards.co/xxxx,但仍将url显示为reinhads.co/xxxx

我也很想说,如果有人输入

reinhards.co/yyyy仅重定向到reinhards.co/reinhards.co/yyyy,因为这是一个有效的网页,但仍然将url显示为reinhard.co/yyyy

RewriteCond %{REQUEST_URI} /test/
RewriteCond %{QUERY_STRING} ^id=229
RewriteRule ^.*$ /supermodel/? [R=301,L]

像这样的东西。