【发布时间】:2016-12-09 13:21:18
【问题描述】:
我知道这个问题被问了很多,但我已经尝试了很多东西,但都没有奏效。当我访问具有非默认永久链接的页面时,我收到 404 Page not found 错误。做了一些研究,我发现这也可能是服务器的问题,这就是为什么我提到我使用安装了 Raspian 的 Raspberry Pi 作为服务器的原因。我正在使用 Apache
我已经尝试过的事情:
我已经尝试过此处显示的解决方案:https://wordpress.org/support/topic/how-to-fix-permalink-postname-404-not-found,以及此处:Permalinks in Wordpress - Page not found。和其他网站
我试过那个说更新
/etc/apache2/sites-available/default,但我没有那个文件-
转到 /etc/httpd/conf 并编辑 httpd.conf,但我的服务器中也没有该文件
确保您的服务器能够写入 .htaccess 文件。是的,我已经确定了这一点,但仍然没有
更改您的 .htaccess 文件,将以下内容添加到文件顶部:
Options +FollowSymlinks。我这样做了,但没有用通过键入(您需要是 root)
a2enmod rewrite启用 rewrite_mod。开启了,还是报错/etc/init.d/apache2 restart重启 apache。我什至重启了我的服务器,什么也没有
如有任何想法,我将不胜感激,在此先感谢
更新:
- 我忘了说当我使用个性化结构时:
/index.php/%postname%/它可以工作,但这种结构在我的网站中会有点奇怪
【问题讨论】:
标签: wordpress server raspberry-pi http-status-code-404