找到C:\Windows\System32\drivers\etc\hosts这个文件,将hosts文件中的”127.0.0.1 localhost“中localhost换成您想要的域名。如
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
换成
127.0.0.1 www.17le.com.cn。
然后在浏览器里面输入www.17le.com.cn实际上就是localhost。
找到C:\Windows\System32\drivers\etc\hosts这个文件,将hosts文件中的”127.0.0.1 localhost“中localhost换成您想要的域名。如
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
换成
127.0.0.1 www.17le.com.cn。
然后在浏览器里面输入www.17le.com.cn实际上就是localhost。
转载于:https://www.cnblogs.com/wanghaosoft/archive/2013/01/11/localhost.html