限制和定义内网访问网站域名
很多时候某个网站只允许内网用户访问,用IP地址不怎么方便,还是像外网一样用域名比较好!
怎么样配置呢?
设置好相应的域名之后,在如下图显示的本地电脑文件夹位置用文本编辑软件打开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 host
127.0.0.1 localhost
127.0.0.1 www.worldfax.net
59.42.10.138 www.gdsoftpark-phpadmin.com
相关内容:
- Windows 2003 建站技术 第三部分
- 4个实用网络测试命令详解
- 数据库连接字符串代码大全
- 全程指导Windows下PHP环境配置 WAMP
- IIS无法解析asp文件的原因分析及解决办法
- Accesskey使用详解
- Windows 2003 建站技术 第一部分
- Java开发者必去的20个英文技术网站
- 全程指导Linux 下PHP环境配置 LAMP
- MySQL数据库修复过程
