我想重定向我的域名登陆页面到其他领域,但我不想重定向后的域名登陆page.Can,任何一个人帮助我如何做到这一点。我的htaccess档案:-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteCond %{HTTP_HOST} ^women\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.women\.com$
RewriteRule ^/?$ "http\:\/\/beta\.women\.com\/" [R=301,L]我想让women.com登陆页面重定向到beta.women.com ,但或women.com.com/about或所有在women.com.com/之后的内容都不要重定向到 beta.women.com。
任何帮助都将不胜感激!
谢谢!
发布于 2016-09-29 12:01:44
在其他规则之前保持重定向规则,并在使用RewriteCond重定向时排除任何查询字符串
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{HTTP_HOST} ^(?:www\.)?(women\.com)$ [NC]
RewriteRule ^/?$ http://beta.%1/ [R=301,L]
RewriteRule ^index\.php$ - [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]https://stackoverflow.com/questions/39769556
复制相似问题