wordpress安装经历

 

 

试装了一下wordpress。

安装过程参考了http://www.phpweblog.net/hawk8359/archive/2008/06/10/4936.html

 比较顺利。记得预先建立好数据库就好。

 

安装完后,登录出现了下面的问题:

在IE中输入http://localhost/.../wordpress/index.php

结果,无法显示博客,而是显示:

Index of /

.....

 

查到了下面的解决方法,很有效~~

--------------------------------------------------

关键词:wordpress Index of /; wordpress显示代码

安装好apache+php+mysql后,一切测试正常。

然后安装好wordpress

最后,要进入自己创建的博客。

在IE中输入http://localhost/index.php

结果,无法显示博客,而是显示:

Index of /
index.php
license.txt
readme.html
wp-admin/
wp-app.php
wp-atom.php
wp-blog-header.php
wp-comments-post.php
一堆代码及目录。

网上搜了些了,总结了下,终于解决,现奉上解决之道,以让后来者少走些弯路。

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 Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

AllowOverride None 修改为:AllowOverride All

4.restart apache

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

6.到这里我测试成功,可以使用博客了。

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/one132/archive/2009/07/28/4387771.aspx

你可能感兴趣的:(apache,windows,wordpress,IE,测试,.htaccess)