1、C:\Windows\System32\drivers\etc\hosts 文件添加127.0.0.1 www.myworld.com 保存文件
2、D;\wamp\bin\apache\apache2.2.8\conf\httpd.conf 里面的#Include conf/extra/httpd-vhosts.conf 去掉# 保存
3、D:\wamp\bin\apache\apache2.2.8\conf\extra\httpd-vhosts.conf 添加我们本地项目域名实际位置
<VirtualHost *:80>
ServerName www.myworld.com
ServerAlias www.myworld.com
DocumentRoot d:/wamp/www/tp5/public
<Directory "d:/wamp/www/tp5/public/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory></VirtualHost>
4、重启服务