.htaccess
Redirect /index2.html http://example.com/index.html导致下列错误
Internal Server Error
The server encountered an internal error or misconfiguration
and was unable to complete your request.我认为Redirect在这个.htaccess中的语法是正确的,因为这个.htaccess可以在另一个服务器上工作。
造成这一错误的原因是什么?
发布于 2012-01-12 09:42:51
我发现唯一可靠地导致这种错误的原因是,由于某种原因,mod_alias (又名alias_module)没有加载。默认情况下,它通常是加载的,但管理员可以禁用它。
您可以通过将.htaccess更改为:
<IfModule alias_module>
Redirect /index2.html http://example.com/index.html
</IfModule>如果没有得到错误,那么mod_alias就不会加载,因此Redirect指令不可用。
如果你还犯了错误,那就是别的什么了。实际上,您需要错误日志来查看发生了什么。
https://serverfault.com/questions/349104
复制相似问题