gpt4 book ai didi

.htaccess - 500 内部服务器错误而不是 404

转载 作者:行者123 更新时间:2023-12-05 04:18:10 26 4
gpt4 key购买 nike

这是我的.htaccess

ErrorDocument 404 /404.html

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

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

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.

最佳答案

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

关于.htaccess - 500 内部服务器错误而不是 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17181671/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com