2

这是我的 .htaccess

ErrorDocument 404 /404.html

但是,例如,当我输入错误的 url 时http://127.0.0.1:8080/myweb/wrong-url.php,它不会转到 404.html 并说 500 INTERNAL SERVER ERROR 任何人都可以解释为什么?

我的错误日志中显示的错误是

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. 
Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
4

1 回答 1

2

您的页面本身很可能会404.html生成另一个 404,因为该位置不是/404.html,而是/myweb/404.html。基本上它会尝试查找404.html文件,但不能,这会生成另一个 404,然后尝试查找404.html文件,但不能,这会生成另一个 404 等等。将您.htaccess的指向 404 更改为/myweb/404.html,或将文件移动到服务器的根目录。

于 2013-06-19T20:15:38.573 回答