htaccess 重定向 conflict/not 工作
htaccess redirect conflict/not working
我有一个二维码需要重定向到新页面。由于某种原因,重定向被覆盖(结束于 cmdgroup。com/community 而不是适当的页面)
RewriteCond %{HTTP_HOST} ^(.*)?companies/Inova-Solutions-Inc/Network-Clocks-by-Inova-Solutions/53e4f5e048e43c1d5cef656d [NC]
RewriteRule ^(.*)$ http://www.cmdgroup.com/companies/1142841/inova-solutions-inc/ [R=301,L]
RewriteCond %{HTTP_HOST} ^(.*)?community.cmdgroup.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)?community.reedconstructiondata.com [NC]
RewriteRule ^(.*)$ http://www.cmdgroup.com/community/ [R=301,L]
这是因为您的第一个 RewriteCond %{HTTP_HOST}
是错误的,因为您只使用 %{HTTP_HOST}
变量匹配域名。将该规则更改为:
RewriteRule companies/Inova-Solutions-Inc/Network-Clocks-by-Inova-Solutions/53e4f5e048e43c1d5cef656d$ http://www.cmdgroup.com/companies/1142841/inova-solutions-inc/ [R=301,L]
RewriteCond %{HTTP_HOST} community\.(cmdgroup|reedconstructiondata)\.com$ [NC]
RewriteRule ^ http://www.cmdgroup.com/community/ [R=301,L]
我有一个二维码需要重定向到新页面。由于某种原因,重定向被覆盖(结束于 cmdgroup。com/community 而不是适当的页面)
RewriteCond %{HTTP_HOST} ^(.*)?companies/Inova-Solutions-Inc/Network-Clocks-by-Inova-Solutions/53e4f5e048e43c1d5cef656d [NC]
RewriteRule ^(.*)$ http://www.cmdgroup.com/companies/1142841/inova-solutions-inc/ [R=301,L]
RewriteCond %{HTTP_HOST} ^(.*)?community.cmdgroup.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(.*)?community.reedconstructiondata.com [NC]
RewriteRule ^(.*)$ http://www.cmdgroup.com/community/ [R=301,L]
这是因为您的第一个 RewriteCond %{HTTP_HOST}
是错误的,因为您只使用 %{HTTP_HOST}
变量匹配域名。将该规则更改为:
RewriteRule companies/Inova-Solutions-Inc/Network-Clocks-by-Inova-Solutions/53e4f5e048e43c1d5cef656d$ http://www.cmdgroup.com/companies/1142841/inova-solutions-inc/ [R=301,L]
RewriteCond %{HTTP_HOST} community\.(cmdgroup|reedconstructiondata)\.com$ [NC]
RewriteRule ^ http://www.cmdgroup.com/community/ [R=301,L]