0

我刚刚安装了一个 wordpress 博客,它将作为一个独立博客用于其他静态站点。博客已经完成,当我查看它时,一切看起来都很好......直到点击了一个永久链接(查看单个帖子)。单击后,用户将被重定向到主页。我相信是 htaccess 文件导致了这种情况。您可以通过查看博客站点来尝试一下:http: //nathantrotter.com/blog/

这是我的 htaccess 文件(来自站点的根目录,wp 博客目录没有)...我需要创建另一行以使博客永久链接正常工作吗?如果是这样,是什么?

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^admin$ admin/index.php
RewriteRule ^products/([A-Za-z0-9_-]+)$ /index.php?p=products&metal=$1
RewriteRule ^services/([A-Za-z0-9_-]+)$ /index.php?p=services&sub=$1
RewriteRule ^about/([A-Za-z0-9_-]+)$ /index.php?p=about&sub=$1
RewriteRule ^facilities/([A-Za-z0-9_-]+)$ /index.php?p=facilities&sub=$1
RewriteRule ^press/([0-9]+)/([A-Za-z0-9_-]+)$ /viewPress.php?id=$1
RewriteRule ^([A-Za-z0-9_-]+)$ /index.php?p=$1
4

1 回答 1

-1

这不是 htaccess 问题。只需进入 WP 永久链接设置页面并更新您现有的永久链接。这解决了它。

于 2012-08-08T13:16:21.320 回答