请按ctrl+D把本页加入收藏夹
文章内容
07-04-06 00:42:26

域名解析未生效前访问自己的站点-建站心得-

       
 


>>域名解析未生效前访问自己的站点<< 域名解析生效有时候要耗上几个小时(国外注册的米好像好点),有时甚至要换DNS server,更是要等上n久。而这段时间多半令人难熬,急切想测试下新空间特性。 其实我们只需要手动修改下hosts文件,就可提前访问自己的站点了。 hosts在XP的默认位置为X:\WINDOWS\system32\drivers\etc\下,其他操作系统可能略有不同,直接查找好了,记得选上高级选项查找系统文件和隐藏文件。 用记事本打开,可看到 # 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 61.152.175.105       whois.mindway.cn 前面#  号的都是注释,我们只需要在127.0.0.1       localhost下行添加自己的IP和域名就可以。 假设我有个米whois.mindway.cn刚解析到自己的空间还没生效,我空间的IP为221.229.127.123, 我们只需添上 221.229.127.123   whois.mindway.cn 保存文件,现在访问http://whois.mindway.cn试试 这个尚未解析的米也能访问了。 其实这个方法也许更多的用在我们申请一些必须绑顶级米的国外空间时。 我们只是想测试下空间性能,可以随便填个米申请时让空间绑上,然后修改hosts文件,即可用这个域名测试空间性能了。

 
 
   
 

 
 
便民工具箱
 
最新文章