【问题标题】:My website found the 404 error page but don't show a page content, only write the file name我的网站发现404错误页面但不显示页面内容,只写文件名
【发布时间】:2021-09-29 22:01:06
【问题描述】:

我正在尝试创建正常的错误 404 重定向页面。 一切都很好,但我有一个小问题试图解决。

当我收到错误 404 时,例如我使用的打开和特定页面:

RewriteEngine On
RewriteRule ^ERROR 404.php [NC,L]
ErrorDocument 404 error

我的 404 错误页面运行良好。但是当我得到和 404 错误时显示这个:

显示文件名而不是里面的内容!

谢谢! 希望你能理解我的问题。

【问题讨论】:

    标签: html apache .htaccess redirect http-status-code-404


    【解决方案1】:

    我找到了解决办法:

    用途:

    ErrorDocument 404 http://localhost/404.php
    

    谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-19
      • 1970-01-01
      • 2013-11-10
      • 2013-08-13
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      相关资源
      最近更新 更多