Wordpress设置Pretty Permalink的方法

设置Wordpress的Pretty Permalink的关键点莫过于下面几点(本文是基于Apache httpd服务器)。

1、Apache httpd要有rewrite module

在httpd服务器的httpd.conf配置文件中把"LoadModule rewrite_module modules/mod_rewrite.so"解除注释。
如果没有mod_rewrite.so模块,那么就要先把rewrite模块先给安装了。

2、在httpd配置文件中,配置项目目录

在项目目录下加入

Options FollowSymLinks
AllowOverride All

3、在wordpress的文件夹加入.htaccess文件

.htaccess文件内容如下:

RewriteEngine On

RewriteBase /wordpress/

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wordpress/index.php [L]

4、如果还不懂那么就参考http://codex.wordpress.org/Using_Permalinks。

posted on 2014-07-18 11:47  ultrazb  阅读(495)  评论(0编辑  收藏  举报

导航