wamp下http.conf虚拟路径的配置

1、打开LoadModule rewrite_module modules/mod_rewrite.so

2、打开

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

3、在httpd-vhosts.conf中配置虚拟访问路径

<VirtualHost *:80>  
DocumentRoot "D:\wamp\www\zfProject" 
ServerName nation.demo  
SetEnv APPLICATION_ENV "development" 
<Directory D:\wamp\www\zfProject>  
DirectoryIndex index.php  
AllowOverride All  
Order allow,deny  
Allow from all  
</Directory>  
</VirtualHost>

 

<VirtualHost *:80>  
DocumentRoot D:\wamp\www 
ServerName localhost  
</VirtualHost>

你可能感兴趣的:(PHP)