此外,在尝试使用ErrorDocument处理请求时,还遇到了404 Not Found错误



我已将.htaccess文件用于

  1. 提供404页
  2. 关闭目录扫描

以下是.htaccess文件的相关部分:

Options -Indexes
ErrorDocument 404 /Page-Not-Found.html

404部分有效。测验

然而,转到实际存在的目录(目录扫描(会返回以下内容:

Forbidden
You don't have permission to access /chihuahuaStories/2014/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

在.htaccess:顶部尝试这些指令

Options -Indexes
ErrorDocument 404 /Page-Not-Found.html
ErrorDocument 403 /Page-Not-Found.html

好的,多亏了前面的答案,我找到了解决方案,即提供以下内容:

ErrorDocument 403 /Page-Not-Found.html

迁移到新服务器后,我在WordPress网站上遇到了同样的错误。

此外,在尝试使用ErrorDocument来处理请求。

我没有得到管理区域或主页的404。只在页面和帖子上得到了错误。我偶然纠正了这个错误。在管理区域,我点击设置/permalink来检查这些permalink是否与我以前的WordPress网站设置匹配,他们确实匹配了。所以,我点击了更新按钮。当我单击修复问题的更新按钮时。

我想当我点击permalink页面上的更新按钮时,它更新了.htaccess文件。

相关内容

最新更新