1、打开apache下httpd.conf
我的目录是在F:wampinapacheapache2.2.22confhttpd.conf
2、去掉这两行前面的#注释
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-vhosts.conf
这两个注释
3、配置httpd-vhosts.conf
<VirtualHost *:80>
ServerName i.fx-dev.com //配置域名
DocumentRoot "F:
oot" //配置运行目录
#RewriteEngine on //需要时配置重写
#RewriteCond $1 !^(index.php|aaa)
#RewriteRule ^(.*)$ /test/test.php/$1 [L]
<Directory "F:
oot"> //目录的权限一定要配置
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
4、配置hosts
127.0.0.1 i.fx-dev.com
5、重启wamp