如何让电脑无法访问特定网站
2011-08-22 00:00
603 查看
有些时候我们需要限制电脑访问某些网站,这个也很简单,可以通过修改hosts文件实现。下面做个例子,让电脑无法访问国内一些新闻类网站。在win7下找到:C:/Windows/System32/drivers/etc/hosts文件,使用记事本打开hosts,在最后添加如下信息:
127.0.0.1 www.sohu.com #限制访问sohu
保存即可让本机无法访问sohu的网站了。
本机host文件的内容如下:
127.0.0.1 www.sohu.com #限制访问sohu
保存即可让本机无法访问sohu的网站了。
本机host文件的内容如下:
# 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 127.0.0.1 www.sohu.com #限制访问sohu 127.0.0.1 www.qq.com #限制访问qq 127.0.0.1 www.ifeng.com #限制访问ifeng 127.0.0.1 www.sina.com.cn #限制访问sina 127.0.0.1 www.163.com #限制访问163 127.0.0.1 www.xinhuanet.com #限制访问xinhuanet 127.0.0.1 www.people.com.cn #限制访问people.com.cn
相关文章推荐
- 如何解决电脑无法访问个别网站
- 如何使用Cisco命令阻止访问特定网站
- 让电脑拒绝访问特定网站
- 如何让一台电脑只能访问某一个网站?
- [PHP]如何使用Mobile_Detect来判断访问网站的设备:安卓,平板,电脑
- [PHP]如何使用Mobile_Detect来判断访问网站的设备:安卓,平板,电脑
- 如何通过手机直接访问本地电脑中的网站
- 如何把asp.net网站发布到自己的电脑,外网也可以访问
- 教你如何分辨用户是用手机还是电脑访问你的网站
- 如何禁止特定IP访问自己网站?
- 如何让局域网其他电脑通过IP直接访问自己电脑的网站
- 如何使用Cisco命令阻止访问特定网站
- [PHP]如何使用Mobile_Detect来判断访问网站的设备:安卓,平板,电脑
- 如何使用Cisco命令阻止访问特定网站
- 使用Charles代理工具导致电脑无法正常访问网站(您的连接不是私密连接)
- 如何解决无法访问某些网站的问题
- 京东PK苏美当天为何苏宁易购出现服务器无法访问的情况?苏宁易购的网站技术架构是什么(软件+硬件)?出现此突发情况,如果你是技术负责人该如何应对?
- 教你如何分辨用户是用手机还是电脑访问你的网站
- 如何使用Cisco命令阻止访问特定网站
- 解惑特定的网站无法访问之谜