限制和定义内网访问网站域名

四月 11, 2008 by zuo
日志类别:网络技术 

很多时候某个网站只允许内网用户访问,用IP地址不怎么方便,还是像外网一样用域名比较好!

怎么样配置呢?

设置好相应的域名之后,在如下图显示的本地电脑文件夹位置用文本编辑软件打开hosts文件,记得先备份一个哦!

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

相关内容:

  1. Windows 2003 建站技术 第三部分
  2. 4个实用网络测试命令详解
  3. 数据库连接字符串代码大全
  4. 全程指导Windows下PHP环境配置 WAMP
  5. IIS无法解析asp文件的原因分析及解决办法
  6. Accesskey使用详解
  7. Windows 2003 建站技术 第一部分
  8. Java开发者必去的20个英文技术网站
  9. 全程指导Linux 下PHP环境配置 LAMP
  10. MySQL数据库修复过程

评论

1条评论 on 解决了wordpress中文tag出错问题

  1. sunglasses on 周四, 29th 七 2010 05:05
  2. great experience, dude! thanks for this great articles wow… it’s very wonderful report.

使用 gravatar 网络头像

登录 后发表评论!