.htaccess 301使用htaccess和textpattern重定向

.htaccess 301使用htaccess和textpattern重定向,.htaccess,mod-rewrite,http-status-code-301,textpattern,.htaccess,Mod Rewrite,Http Status Code 301,Textpattern,正在尝试为域中的更改设置301重定向。我使用的文本模式已经有了修改。当添加重定向时,我会在网站上看到一个错误页面,指出该页面导致了太多的重定向 这是正在使用的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 t

正在尝试为域中的更改设置301重定向。我使用的文本模式已经有了修改。当添加重定向时,我会在网站上看到一个错误页面,指出该页面导致了太多的重定向

这是正在使用的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>

非常感谢您提供的任何建议。

您尝试从哪个域重定向?可能您已经设置了循环-尝试从site.com重定向到site.com?

在重新编写引擎后添加此选项

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