打开httpd.conf
1、
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-vhosts.conf
取消前面的#
2、
<Directory />
AllowOverride none
Require all denied
</Directory>
改为
<Directory />
Options FollowSymLinksAllowOverride None
Order deny,allow
Deny from all
</Directory>
找到“AllowOverride None”改为“AllowOverride All”.;
Allow 改为Deny
3、打开httpd-vhosts.conf 文件
localhost
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "d:/wamp/www/"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>