Rotten mud: understanding and application of iis host Header

Source: Internet
Author: User

This article was sponsored by 51cto.com and first launched in the dark world.

In the previous article "rotten mud: using IIS, Zblog, and SQLServer to build an ASP blog", we introduced the configuration of the iis host header. In this article, we will explain the application of the Host Header in depth.

We switch to the properties interface of the ilanni website, for example:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image001 "border =" 0 "alt =" clip_image001 "src =" http://www.bkjia.com/uploads/allimg/131227/1K12BS4-0.png "width =" 498 "height =" 479 "/>

Select "advanced" to go to the interface, as shown in:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image002 "border =" 0 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/131227/1K1262221-1.png "width =" 500 "height =" 469 "/>

On this page, we can see that the current host header is ilanni.com. We can access blogs in the form of http://ilanni.com, such:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image003 "border =" 0 "alt =" clip_image003 "src =" http://www.bkjia.com/uploads/allimg/131227/1K1261256-2.png "width =" 416 "height =" 304 "/>

But if we can access a blog in the form of http://www.ilanni.com?

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image004 "border =" 0 "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/131227/1K12C3b-3.png "width =" 521 "height =" 495 "/>

We can see that we cannot access it now. Now we add the Host Header www.ilanni.com, for example:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image005 "border =" 0 "alt =" clip_image005 "src =" http://www.bkjia.com/uploads/allimg/131227/1K1264058-4.png "width =" 570 "height =" 505 "/> 650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image007 "border =" 0 "alt =" clip_image007 "src =" http://www.bkjia.com/uploads/allimg/131227/1K12C929-5.jpg "width =" 569 "height =" 462 "/>

Now we can see that both the form ilanni.com and www.ilanni.com can be accessed.

This is an access method. What if my current host header is a.com? For example:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image008 "border =" 0 "alt =" clip_image008 "src =" http://www.bkjia.com/uploads/allimg/131227/1K1261336-6.png "width =" 433 "height =" 314 "/>

The access result is as follows:

650) this. width = 650; "style =" background-image: none; margin: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image010 "border =" 0 "alt =" clip_image010 "src =" http://www.bkjia.com/uploads/allimg/131227/1K12B9E-7.jpg "width =" 580 "height =" 357 "/>

Obviously, a.com and ilanni.com are used to access the same website. This form of access applies. If a company or individual has multiple domain names, it is best to access the same website.

PS: All domain names involved in this article must be mapped in the hosts file. For example:

650) this. width = 650; "style =" background-image: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; "title =" clip_image011 "border =" 0 "alt =" clip_image011 "src =" http://www.bkjia.com/uploads/allimg/131227/1K12C5Y-8.png "width =" 497 "height =" 585 "/>

This article from the "muddy world" blog, please be sure to keep this source http://ilanni.blog.51cto.com/526870/1228563

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.