C:\WINDOWS\system32\drivers\etc 看看这个文件夹下面的 hosts 的文件 # copyright (c) 1993-1999 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 host127.0.0.1 localhost 127.0.0.1 localyl 127.0.0.1 你可以自己定义一个映射,比如,我定义的一个 127.0.0.1 localyl 下次我把 localhost 换成localyl 一样用!!
楼主【wongshiang】截止到2008-07-04 11:27:11的历史汇总数据(不包括此帖):
发帖的总数量:1 发帖的总分数:0
结贴的总数量:1 结贴的总分数:0
无满意结贴数:1 无满意结贴分:20
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:---------------------
无满意结贴率:100.00% 无满意结分率:---------------------
敬礼!
看看这个文件夹下面的 hosts 的文件 # copyright (c) 1993-1999 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 host127.0.0.1 localhost
127.0.0.1 localyl
127.0.0.1 你可以自己定义一个映射,比如,我定义的一个 127.0.0.1 localyl 下次我把 localhost 换成localyl 一样用!!
4楼正解!该文件把Localhost映射成127.0.0.1所以.用哪个都一样.
可以在etc中配置域名,当你发起请求的时候 windows会首先检查自己的配置文件的,替换域名,如果没有对应的域名就会请求网络上的域名服务器。
所以localhost配置了什么ip地址 就代表了什么