【发布时间】:2012-07-10 12:23:59
【问题描述】:
我在http://tallytree.com 上安装了一个相对较新的wordpress。我今天尝试更改永久链接以使其更好。但是,当我使用
/%postname%/
作为永久链接并应用。 Wordpress 将此写入我博客根目录的 .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
现在,当我单击博客上的帖子标题时,我收到 apache 404 错误。我继续将永久链接更改为这个自定义结构:
/index.php/%postname%/
现在可以了。但是我的网址中有一个 index.php 例如: http://tallytree.com/index.php/comparing-a-few-force-directed-layout-implimentations/
如何设置永久链接,以便 index.php 不必在 URL 中?
【问题讨论】:
标签: wordpress apache mod-rewrite permalinks