我的主机文件存在一些问题。
127.0.0.1 localhost
127.0.0.1 whatever
127.0.0.1 sub.localhost
127.0.0.1 example.com
localhost
和whatever
两个工作。然而,其他人有奇怪的行为。
Ping sub.localhost
c:\>ping sub.localhost
Pinging sub.localhost [127.0.0.1] with 32 bytes of data:
Ping example.com
C:\>ping example.com
Pinging example.com [127.0.0.1] with 32 bytes of data:
一切似乎都没问题,但浏览example.com将打开正确的example.com页面@ 192.0.32.10,这不是预期的行为......(显然sub.localhost根本不工作)
任何想法为什么会这样?
更新1:从浏览器中删除代理配置解决了它sub.localhost
。example.com
但仍然没有工作......
更新2:更多信息......
C:\Documents and Settings\amatos>ping example.com
Pinging example.com [127.0.0.1] with 32 bytes of data:
C:\Documents and Settings\amatos>ping www.example.com
Pinging www.example.com [127.0.0.1] with 32 bytes of data:
C:\Documents and Settings\amatos>nslookup example.com
Server: ac1.-------.pt (# suppose this is the router address...)
Address: 192.168.202.2
Non-authoritative answer:
Name: example.com
Address: 192.0.32.10
感谢迄今为止所有尝试过的人!