Apache 修改我的站点的重写规则

Apache 修改我的站点的重写规则,apache,.htaccess,mod-rewrite,redirect,Apache,.htaccess,Mod Rewrite,Redirect,我的网站上有以下规则: RewriteCond $1 !^(support|about-us|profile|support|features|videos|terms-of-service|about-us|signup|media|includes|modules|cgi-bin|templates|xmlrpc|language|libraries|plugins|administrator|component|images|dev|data) RewriteCond %{THE_REQU

我的网站上有以下规则:

RewriteCond $1 !^(support|about-us|profile|support|features|videos|terms-of-service|about-us|signup|media|includes|modules|cgi-bin|templates|xmlrpc|language|libraries|plugins|administrator|component|images|dev|data)
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([a-z0-9\-]+)/[^\ ]*\ HTTP/
RewriteCond %{DOCUMENT_ROOT}/$1 -d
RewriteRule ^([a-z0-9\-]+)/(.*)$ https://$1.example.com/$2 [R=301,L]
#

我在下面添加了这些来重定向这些类型:etc

然而,我不能让这些重定向

如果我从最后3行中删除查询字符串,那么如果我在我的网站上单击features链接,它将重定向到顶部的规则所阻止的内容


有人能帮忙吗。

你能澄清一下你以前的规则在做什么吗?以前的规则应该是将所有请求重定向到等。我不清楚。你能举例说明一下吗。
RewriteCond %{HTTP_HOST} ^([a-z0-9\-]+)\.example\.com
RewriteCond %1 !^www\.
RewriteRule ^(support|about-us|profile|support|features|newserver|videos|about-us|terms-of-service|signup|component|includes|media|cgi-bin|templates|xmlrpc|language|modules|libraries|plugins|administrator|images(/.*))$ https://example.com/$1 [R=301,L]

 # Externally redirect all www hostnames to non-www hostnames
 RewriteCond %{HTTP_HOST} ^(([a-z0-9\-]+\.)*)www\.(([a-z0-9\-]+\.)*)example\.com
 RewriteRule ^(.*)$ https://%1%3example.com/$1 [R=301,L]
 RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
 RewriteCond %{QUERY_STRING} ^mv=[0-4]$
 RewriteRule ^([A-Za-z0-9]+)$ https://$1.example.com/? [L,R]