【发布时间】:2018-04-23 19:39:37
【问题描述】:
我刚刚将我的 WordPress 站点从 Windows 迁移到 Linux 服务器。除了永久链接设置为 /%postname%/ 的帖子外,一切似乎都正常工作。我以为这是mod_overwrite 问题。
我已将 httpconf 文件从 AllowOverride None 更改为 AllowOverride All
然后重置服务器只是为了确保它生效。
我的 .htaccess 看起来像这样:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
我在专用服务器上的 CentOS5 上运行 Apache 2.2。
补充一点:除了带有这些自定义永久链接的帖子之外,所有页面都可以正常工作。
我已将 .htaccess 的权限设置为 666
【问题讨论】:
标签: wordpress apache .htaccess server httpd.conf