我正在尝试使用.htaccess文件将各种网址重定向到我的主网站。
重定向似乎不起作用。
有谁请知道为什么???
附加示例......
非常感谢。乔恩
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^projectorsnz.co.nz [NC]
RewriteRule ^(.*)$ http://www.projectorsnz.co.nz/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^projectorsnz.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.projectorsnz.com [NC]
RewriteRule ^(.*)$ http://www.projectorsnz.co.nz/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^cheapprojectors.co.nz [NC,OR]
RewriteCond %{HTTP_HOST} ^www.cheapprojectors.co.nz [NC]
RewriteRule ^(.*)$ http://www.projectorsnz.co.nz/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^htpcprojectors.co.nz [NC,OR]
RewriteCond %{HTTP_HOST} ^www.htpcprojectors.co.nz [NC]
RewriteRule ^(.*)$ http://www.projectorsnz.co.nz/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^htpcprojectors.co.nz [NC,OR]
RewriteCond %{HTTP_HOST} ^www.htpcprojectors.co.nz [NC]
RewriteRule ^(.*)$ http://www.projectorsnz.co.nz/$1 [L,R=301,NC]