2010-04-12 55 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]