【发布时间】:2012-08-27 22:53:37
【问题描述】:
我想在我的 Windows 2008 R2 服务器上做一些测试。也就是说,让一个 URL 重定向到localhost。
例如让"http://mysample.mydomain.com/index.html"实际访问“http://localhost/index.html”。有什么办法可以做到吗?
我尝试编辑windows\system32\drivers\etc\hosts 文件,添加127.0.0.1 -> mysample.mydomain.com 映射,但它不起作用。似乎127.0.0.1 和localhost 并不相同。
我可以访问“http://localhost/index.html”,但无法访问“http://127.0.0.1/index.html”!
提前致谢!
【问题讨论】:
-
我认为这应该迁移到 superuser.com
标签: localhost windows-server-2008-r2 ipv6 ipv4