正在尝试为域中的更改设置301重定向。我使用的是Textpattern,它已经进行了mod重写。当添加重定向时,我在网站上看到一个错误页面,说明该页面导致了太多的重定向!
这是正在使用的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>非常感谢您能给出的任何建议。
发布于 2010-07-29 20:47:38
您尝试从哪个域进行重定向?你可能已经设置了循环-尝试从site.com重定向到site.com?
发布于 2014-01-09 07:14:42
在RewriteEngine On之后添加此命令
RewriteCond %{HTTP_HOST} ^(?!www.yournewdomain.com$).*$
RewriteRule (.*) http://www.yournewdomain.com/$1 [R=301,L]https://stackoverflow.com/questions/2621325
复制相似问题