2012-07-10 156 views
0

我在http://tallytree.com上有一个比较新的wordpress安装。我试图改变固定链接,使其更好。但是,当我使用为什么我需要用“/index.php”开始我的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不必是网址?

回答

2

坐落在WordPress的永久链接页面到自定义结构:/%类别%/%postname%/

的WordPress应该写这个的.htaccess文件:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

的index.php不会显示在网址中。如果这可行,则可以将自定义结构更改为/%postname%/