您的位置:首页 > 其它

wordpress查看站点时显示目录

2013-03-11 18:22 309 查看
1.在wordpress的代码目录中增加.htaccess文件(windows下无法直接生成没有名字的文件,不过可以另辟蹊径,随便在哪里新个文本,或者在UE中新建个文档,然后保存到wordpress的代码目录中,名字写上.htaccess,这样就可以创建想要的.htaccess文件了。

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

3.在apache的配置文件httpd.conf中:

<Directory "C:/Program Files/Apache SoftwareFoundation/Apache2.2/cgi-bin">

AllowOverride None

OptionsNone

Orderallow,deny

Allow fromall

</Directory>

AllowOverride None 修改为:AllowOverride All

4.restart apache

5.开个新的IE(要开新的),输入http://localhost/index.php测试。

6.到这里我测试成功,可以使用博客了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: