htaccess在同一个域上重定向太多 - old_file到new_file

时间:2015-08-20 07:36:50

标签: html .htaccess redirect browser hosting

我尝试在stackoverflow上找到但没有运气的解决方案......

这是我的htaccess代码:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mysite.com[nc]

RewriteRule ^(.*)$ http://www.mysitesite.com/$1 [r=301,nc]

ErrorDocument 404 /404.html

Redirect 301 old_file.html new_file.html

==============================

我不知道出了什么问题但浏览器说“重定向太多”。 请看看并告诉我出了什么问题。

1 个答案:

答案 0 :(得分:0)

这是解决方案:

  

RewriteRule ^ old_site.html $ http://example.com/new_site.html