Home  >  Article  >  Backend Development  >  HOSTS绑定域名跟IP,但是访问IP和域名,出来的内容不一样

HOSTS绑定域名跟IP,但是访问IP和域名,出来的内容不一样

WBOY
WBOYOriginal
2016-06-13 12:31:08702browse

HOSTS绑定域名和IP,但是访问IP和域名,出来的内容不一样
HOSTS 文件是这样绑定的
       119.57.113.31 cloudtest.cnfol.com

访问IP出现的是这样的内容
    

输出域名又是这样的结果
    


我是这样理解的,输入域名,操作系统首先会去找HOSTS文件,然后映射为IP地址。

所以访问IP和域名应该是一模一样的结果。

GOOGLE一下,没有找到想要的答案!!

一台主机上可能有多个网站,所以访问IP可能访问不了,访问域名才访问得了。这个我明白。

关键这是绑定在HOSTS上啊。想不通啊。

求解释!!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn