【发布时间】:2012-05-11 10:37:37
【问题描述】:
我正在尝试实现自定义的 404 错误页面,但这就是我得到的
**The requested URL /about/hdhdhdh.php was not found on this server.
Additionally , a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request**
在我的 .htaccess 里面有这个
ErrorDocument 404 /404.php
.htaccess 和 404.php 都在同一个目录中。请问可能是什么问题。
更新
去掉404.php前面的初始正斜杠后..现在看起来像这样
ErrorDocument 404 404.php
现在,当我输入无效链接时,屏幕上会显示 404.php,同时我有一个格式正确的 404.php 页面。
【问题讨论】:
-
你可以接受ethanh的回答,因为你按照他说的做了。
-
还没有......它只显示“404.php”而不是实际的格式化页面。有什么我错过了吗?谢谢。
-
好的,你之前的更新并不清楚,我以为它显示了你的自定义 404.php-page
标签: php .htaccess http-status-code-404