2010-04-12 81 views
0

尝试为域中的更改设置301重定向。我正在使用已经有mod重写的Textpattern。添加重定向时,系统会提示网站上的错误页面,指出该页面导致了太多重定向!301使用htaccess&textpattern重定向

这是在使用htaccess文件...

<IfModule mod_rewrite.c> 
RewriteEngine On 
#RewriteBase /relative/web/path/ 

RewriteRule (.*) http://www.domain.com/$1 [R=301,L] #(this has been added to the default textpattern htaccess file) 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^(.+) - [PT,L] 

RewriteCond %{REQUEST_URI} !=/favicon.ico 
RewriteRule ^(.*) index.php 

RewriteCond %{HTTP:Authorization} !^$ 
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] 
</IfModule> 

任何非常感谢劝你可以给。

回答

0

从哪个域尝试重定向?可能是你设置了单车 - 试图从site.com重定向到site.com?

0

RewriteEngine叙述后添加这个在

RewriteCond %{HTTP_HOST} ^(?!www.yournewdomain.com$).*$ 
RewriteRule (.*) http://www.yournewdomain.com/$1 [R=301,L]