在电脑上,大家都知道hosts文件的主要作用是可以加快某个域名或网站的解析速度,来达到快速访问某个网站的目的,但是有win7用户在修改hosts文件时却出现了配置异常的情况,那么win7系统hosts文件异常怎么办呢,下面小编给大家分享解决该问题的方法。
解决方法:
1、将hosts文件复制到桌面,用记事本打开。
2、删除记事本的全部内容,将以下内容复制后放入文件然后保存:
#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 host
127.0.0.1 localhost
127.0.0.1 localhost
复制代码。
3、将修改后的hosts文件放入C:\Windows\System32\drivers\etc替换以前的hosts文件,修复成功。
以上就是win7hosts文件配置异常的解决方法,有在修改hosts文件的时候出现了同样的问题,可以按上面的方法来进行解决。