win7的hosts为什么是空的?

win7的hosts为什么是空的?,第1张

因为hosts这是一个兼容性的文件, 没有DNS服务器之前,域名解析依靠的就是hosts文件,后来才有的DNS服务器,为了兼容才继续保留这个文件的,空也很正常。。不过有时候,用它来屏蔽掉一些网站。。

加上这些就行了:

# 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

134.170.108.26 onedrive.live.com

134.170.109.48 skyapi.onedrive.live.com


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/7739536.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-09
下一篇 2023-04-09

发表评论

登录后才能评论

评论列表(0条)

保存