1.在wordpress的代码目录中增加.htaccess文件(windows下无法直接生成没有名字的文件,不过可以另辟蹊径,随便在哪里新个文本,或者在UE中新建个文档,然后保存到wordpress的代码目录中,名字写上.htaccess,这样就可以创建想要的.htaccess文件了。
<wbr></wbr>
2.在.htaccess文件中加入如下内容:
DirectoryIndex index.php index.html
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<wbr></wbr>
3.在apache的配置文件httpd.conf中:
<wbr></wbr>
<Directory "C:/Program Files/Apache SoftwareFoundation/Apache2.2/cgi-bin">
<wbr><wbr><wbr>AllowOverride None<br><wbr><wbr><wbr> OptionsNone<br><wbr><wbr><wbr> Orderallow,deny<br><wbr><wbr><wbr> Allow fromall<br> </Directory></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
AllowOverride None 修改为:AllowOverride All
<wbr></wbr>
4.restart apache
<wbr></wbr>
5.开个新的IE(要开新的),输入http://localhost/index.php测试。
<wbr></wbr>
6.到这里我测试成功,可以使用博客了。