我打算搞个网站玩玩,在虚拟机上搞的。
选择了wordpress。按操作安装完后。
选择http://sfishere/wordpress/总是进入index的目录下面
不知道为什么!!!
后来找到了解决方案:
首先在wordpress目录下面建立一个.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 WordPres
在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
文件末尾添加
DirectoryIndex index.php index.html
OK!!
但是不知道为什么要这么做!!!