【发布时间】:2012-09-27 10:36:38
【问题描述】:
我知道这个帖子在网上和这里已经讨论了很多,我尝试了几乎所有的方法,但我仍然遇到同样的问题。
这是我在本地服务器上的网址 (MAMP)
http://localhost:8888/hellothere/index.php
而且我试图插入错误的路径将我带到错误的页面,如下所示:
http://localhost:8888/hellothere/eiurgiuerib
它没有将我带到错误页面,而是显示:
Not Found
The requested URL /hellothere/eiurgiuerib was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
我的 404 页面位于错误目录中。在我的 .htaccess 文件中,我包含了这个:
ErrorDocument 404 /Error/404.php
【问题讨论】:
-
自定义错误页面不工作。那我该怎么办?
-
你能显示你的文件夹架构吗?
-
请不要使用图片来显示文本数据。意思是找不到/Error/404.php -- 检查拼写、大小写以及目录和文件权限。您应该能够从浏览器地址调用 404.php -- 找到了吗?
标签: php apache .htaccess http-status-code-404