【发布时间】:2015-01-26 01:34:04
【问题描述】:
这让我发疯了!我使用 wordpress,在我的 htaccess 中我有以下内容:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
我试图在我的 htaccess 的最顶部放置; Errordocument /index.php?error=404 和其他替代方向,但它们要么导致页面不重定向或内部服务器错误等。
我已经看到这里已经解决了其中的许多问题,但我还没有发现有人在他们的 htaccess 中具有相同代码的情况。 我已尝试删除
RewriteRule ^index\.php$ - [L]
和
RewriteRule . /index.php [L]
这给出了更多错误,解释了在 getheader() 处尝试查找我的 404.php 或 404.php 的第 10 行时出现 404 错误,并且它还完全删除了我的 BWP 站点地图。 我正在使用子主题,但我已将 404.php/header/footer/index 复制到子主题以使事情变得简单。 任何帮助将不胜感激
谢谢
【问题讨论】:
-
检查我的答案以获取更新
标签: wordpress .htaccess http-status-code-404