Windows 主机文件
这些行之间有什么区别:
::1 localhost
... 和
127.0.0.1 localhost
Windows 主机文件中的?
最初,我的主机文件中有第一种行,在浏览器中输入 localhost 导致我进入 127.0.0.1。 然后我有一段时间没有在浏览器中使用 localhost 提示符,当我需要再次使用它时它就不起作用了。 我更改了主机文件中第二行的第一行,它起作用了。 为什么会发生这种事?
What's the difference between these lines:
::1 localhost
...and
127.0.0.1 localhost
in Windows hosts file?
Initially I had the line of the first kind in my hosts file and typing localhost in the browser led me to 127.0.0.1. Then I didn't use localhost prompt in the browser for some time, and when I needed to use it again it just didn't work. I changed the first line form the second one in my hosts file and it worked. Why could that happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
::1 是 IPv6。
127.0.0.1 是 IPv4。
::1 is IPv6.
127.0.0.1 is IPv4.
::1 是 IPv6
127.0.0.1 是 IPv4
我猜你在测试之间禁用了 IPv6?
::1 is IPv6
127.0.0.1 is IPv4
I guess you disabled IPv6 in between tests?
前者“::1”是本地主机的 IPv6 压缩语法。 它相当于 127.0.0.1。 您是否在操作系统或网络适配器中禁用了 IPv6 支持? 也许这就是它停止工作的原因。
The former, "::1" is IPv6 compressed syntax for the localhost. It is equivalent to 127.0.0.1. Did you disable IPv6 support in your OS or network adapter? Maybe that's why it stopped working.
我相信 ::1 是 127.0.0.1 的 IPV6 表示法。
I believe ::1 is the IPV6 notation of 127.0.0.1.