You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

已在.htaccess配置404跳转,浏览器仅显示error404.html文本未加载页面

解决方案
  • 修正ErrorDocument的路径写法,使用网站根目录绝对路径:将ErrorDocument 404 error404.html改为ErrorDocument 404 /error404.html(斜杠开头确保指向站点根目录下的目标文件)。
  • 检查本地Apache服务器的AllowOverride配置:
    1. 打开服务器的httpd.conf配置文件(比如XAMPP路径为xampp/apache/conf/httpd.conf,WAMP路径为wamp/bin/apache/apacheX.X.X/conf/httpd.conf)。
    2. 找到对应站点目录的<Directory>块(比如本地默认站点的<Directory "C:/xampp/htdocs">)。
    3. 将AllowOverride None修改为AllowOverride All,保存配置文件。
  • 重启本地Apache服务器,使配置生效。
  • 强制刷新浏览器页面(按下Ctrl+F5),清除缓存后重新访问不存在的页面测试。

内容的提问来源于stack exchange,提问作者Wolfgang Serque

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 20:35:27