25

我遇到了一个烦人的问题,当我尝试localhost:8080在 IE9 中打开时,它会继续在 Internet 上搜索它作为关键字。它在其他浏览器中运行良好,例如 Firefox 和 Chrome。我也试过http://localhost:8082/,但这也行不通。到底是怎么回事?

4

7 回答 7

33

显然,如果您安装了 IIS,则此问题可能是由与 IIS 的冲突引起的。还有其他问题也可能导致 IE9 127.0.0.1 分辨率失败。

Microsoft 提供的解决此问题或 IE 无法解析网站的任何问题的常见步骤涉及重置 IE9 浏览器设置:

  • 打开工具 -> Internet 选项
  • 单击“高级”选项卡。
  • 点击“重置”
  • 点击“删除个人设置”复选框
  • 在“重置 Internet Explorer 设置”对话框中,单击“重置”。
  • 更改完成后,单击“关闭”,然后重新启动浏览器。

If after following these steps, the problem still hasn't disappeared, repeat the above steps, except instead of clicking "Reset" in the "Advanced" tab, click "Restore Advanced Settings", which is located below "Reset".

This tech guide describes the steps for resetting the advanced settings on Windows 7 for IE9.

NOTE: Resetting will reset IE to factory settings. You'll lose your existing configuration and any settings or data in IE. Judging by your love for this browser, I'm assuming there isn't any data in there that you care about. ;) However, be sure you're okay with this before following these steps

于 2012-05-26T06:29:08.357 回答
5

尝试使用环回 IP 而不是 localhost:

http://127.0.0.1:8082/

IE 可能正在努力解析 localhost。

于 2012-05-26T06:02:11.053 回答
3

C:\Windows\System32\drivers\etc\

并用记事本打开文件主机。有没有类似的记录

127.0.0.1    localhost

如果不尝试添加它,否则是 IE ......

于 2012-05-26T06:07:09.203 回答
3

如果你们中的一些人仍然有这个问题,请尝试以隐私模式打开 IE。它对我有用。

于 2014-10-15T14:54:55.497 回答
2

我已经通过编辑 c:\Windows\System32\drivers\etc\hosts 文件解决了这个问题。有一行代码:[选择]

::1 本地主机

显然不应该在那里。不知道它是如何到达那里的,但删除它显然会恢复 localhost 功能。

这将帮助您更改只读主机文件的权限。

在此处输入图像描述

确保将其更改回只读。

于 2012-05-26T06:18:02.940 回答
1

In Site Bindings set the IP Address to : All Unassigned / select a port (if you want).

This also works for IE 11,

localhost 或 127.0.0.1 在 IE 11 中不起作用

Then Try http://localhost:323/

于 2013-11-01T09:58:00.770 回答
0

事实证明,我有一个在后台运行的虚拟机绑定到我试图访问的端口。Chrome 可以正确显示该页面,但 IE 和 Firefox 拒绝与其建立任何连接。

我通过在不同的端口号上启动本地服务器解决了这个问题,即 3001 而不是 3000。

于 2017-06-29T08:35:40.227 回答