网站上线后,调试一会显示500错误,提示如下:
Internal Server Error
The server encountered an internal error or misconfiguration andwas unable to complete your request.
Please contact the server administrator, root@localhost andinform them of the time the error occurred, and anything you mighthave done that may have caused the error.
More information about this error may be available in the servererror log.
查看后说是服务器错误,然后查看了服务器日志,找到错误日志提示如下:
Request exceeded the limit of 10 internal redirects due to probableconfiguration error. Use 'LimitInternalRecursion' to increase thelimit if necessary. Use 'LogLevel debug' to get a backtrace.,referer: http://www.kfd-crusher.com
翻译:请求超过了10个内部重定向的限制,由于可能的配置错误。使用'LimitInternalRecursion'如果需要增加限。使用“将LogLevel调试”获得回溯,来源:http://www.kfd-crusher.com
内部重定向限制,跟重写模块有关,查看.htaccess文件,果然发现重写规则写错了;
修改过后就可以正常打开了。
注:很多情况是在本地做好的网站,上传后没有及时修改.htaccess文件,造成这种情况。