在win xp中,hosts文件在目录windows\system32\drivers\etc下。
127.0.0.1 localhost
127.0.0.1 test1
127.0.0.1 test2
127.0.0.1 test3
这样设置后,测试机器就可以解析test1,test2,test3解析到127.0.0.1
转载于:https://www.cnblogs.com/swingboat/archive/2005/04/28/147003.html