【发布时间】:2021-10-27 14:49:44
【问题描述】:
我正在尝试实现 404 错误页面。我有这个项目结构:
+Project
+---index.html
+---404.html
+---.htaccess
我的 .htaccess 包含这一行:ErrorDocument 404 /404.html
但是这个 URL 没有显示我的 404.html 页面:
http://localhost:63342/Project/wrong.html
相反,我得到了默认的 Opera 404 页面:https://ibb.co/XsFq5nZ
而我的 404.html 页面如下所示:https://ibb.co/ZX7XB1d
error.html 的回复是这样的:https://ibb.co/mJ2KztK
有什么问题?
【问题讨论】:
标签: html .htaccess http-status-code-404