.htaccessredirect301循环

我在通过Apache服务器上的.htaccess文件实现301redirect时遇到问题。

我可以在.htaccess文件中启用“redirect301”语句,它们将显示工作几分钟,但在服务器开始返回“太多自动redirect”错误并且网站变得不可用之后不久。

显然,我在代码中有一个循环,但是我看不到它。 有人能够指出吗?

另外,我应该使用“RedirectMatch”而不是“redirect”?

这里是.htaccess文件的内容:

ErrorDocument 404 http://www.example.com/404.html RewriteEngine On RewriteRule (wooden_house|straw_house|brick_house_(One|Two|Three)Piggy)\.html$ /$1.php # //Rewrite to www Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [nc] RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc] RewriteCond %{ENV:REDIRECT_STATUS} 200 RewriteRule .* - [L] # //301 Redirect Old File Redirect 301 /index.php http://www.example.com Redirect 301 /index.shtml http://www.example.com Redirect 301 /index.pl http://www.example.com Redirect 301 /default.htm http://www.example.com