为什么在服务器上但在本地主机上找不到错误页面404?

时间:2019-05-08 06:08:43

标签: .htaccess http-status-code-404

当我在localhost上运行我的网站时,发现错误页面404并且可以正常工作,但在服务器上却没有。在服务器上,我收到一条错误消息,提示“ 404-找不到文件或目录”。

htaccess中的localhost代码:

ErrorDocument 404 /portfolio-update1/error/404page.html

在服务器端,我同时尝试了两种方法:

ErrorDocument 404 http://mydoiman.com/error/404page.html

ErrorDocument 404 /error/404page.html

我已经检查了文件路径和拼写。我该如何解决。我对htaccess很陌生。

0 个答案:

没有答案