当我在IE8中input本地主机时,我只能redirect到我们的公共网站

有一天我发布这个问题https://stackoverflow.com/questions/7519360/urls-are-inconsistently-being-redirected-using-isapi-urlrewrite-3-0

我正在笔记本电脑上进行一些本地开发testing,我得到了一些一般的怪异(如超链接问题所示)。 现在问题似乎更大。 我竟然在本地closuresIIS。 当我input'localhost'时,我会发送到www.sc-pa.com。 但是,虽然IIS仍在运行,但是如果我input了“localhost / default.asp”,那么确实有效。 我已经尝试ping本地主机,这似乎很好。 我试过了tracert。 我唯一知道的,我在本地做的可能是问题是添加DNS后缀到我的连接。 除此之外,我不明白这是如何发生的。

我的本地IIS的日志甚至在运行时不会被打到,我input'localhost'。

我的主机文件C:\ Windows \ System32 \ drivers \ etc

该文件的moddate是6/10/2009,我永远不会修改它。 这对我来说很正常。

# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 

从nslookup localhost更新视图

在这里输入图像说明

更新#2

我已经把问题隔离到了IE8。 Chrome和Firefox会将本地主机parsing到本地机器。 我已经尝试重置IE8中的所有设置,这并没有帮助。 我甚至连接到另一个无线networking,并尝试。

你有没有尝试取消你的主机文件中的IPv4本地主机条目注释?

 # 127.0.0.1 localhost 

这里的一些答案提供了更多的细节,为什么会发生在Vista和更高版本的操作系统上,但据我所知,根本原因与MS决定实施DNSparsing,特别是IPv6的方式有关: https:// stackoverflow .COM /问题/ 1416128 /我的本地主机,云那么慢,现在已经是-I-AM-ON-窗口-7和-ASP净MVC

和:

Windows 7:“本地主机名称parsing在DNS本身内处理”。 为什么?

Windows将首先在主机文件中尝试查找,然后尝试使用名称服务器(如果找不到适当的条目)。

因此,因为主机文件中没有localhost的条目,所以由名称服务器来parsinglocalhost。

一种可能性是名称服务器将本地主机parsing为本身,而不是您的机器,并给出redirect的外观。

在命令行中键入ping localhost ,如果它不返回127.0.0.1或不是::1 ,则表示有问题。

nslookup localhost可能会或可能不会给你“不存在的域名”。