Windows 主机文件

发布于 2024-07-16 08:44:47 字数 328 浏览 11 评论 0原文

这些行之间有什么区别:

::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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

就是爱搞怪 2024-07-23 08:44:48

::1 是 IPv6。

127.0.0.1 是 IPv4。

::1 is IPv6.

127.0.0.1 is IPv4.

七堇年 2024-07-23 08:44:48

::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?

铁轨上的流浪者 2024-07-23 08:44:48

前者“::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.

同尘 2024-07-23 08:44:48

我相信 ::1 是 127.0.0.1 的 IPV6 表示法。

I believe ::1 is the IPV6 notation of 127.0.0.1.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文