Wordpress帖子名Permalinks 404

Wordpress帖子名Permalinks 404,wordpress,mod-rewrite,permalinks,Wordpress,Mod Rewrite,Permalinks,我在wordpress网站上使用post name permalink设置时遇到404个错误 我通常发现这是因为apache mod_重写没有启用。然而,在这种情况下,它是 我的htaccess文件如下所示: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-

我在wordpress网站上使用post name permalink设置时遇到404个错误

我通常发现这是因为apache mod_重写没有启用。然而,在这种情况下,它是

我的htaccess文件如下所示:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
我还在virtualhosts文件中设置了AllowOverride

我不确定这个错误的任何其他可能原因,有人可以建议吗?如果这有什么区别的话,该站点就是一个子域。

1)请确保您确实启用了修改重写功能。在终端提示下,输入以下内容:

sudo a2enmod重写

sudo服务apache2重启

2)并将None编辑为All

AllowOverride None--->AllowOverride All

sudo nano/etc/apache2/apache2.conf

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

选项索引跟随符号链接
允许超越所有
要求所有授权

在那之后,它会正常工作。

您的
.htaccess
文件权限是什么?同时更改
重写规则/index.php[L]
重写规则。index.php[L]
有帮助吗?权限是775,更改似乎没有帮助。整个站点是否在根目录中?