简体   繁体   中英

How to map SubDomain to the subfolder without creating additional websites in IIS?

Hi I'm using a BlogEngine.net for my blog and I would like to create 5 different subdomains and point to different subfolders(not redirecting). For example:

firstsubdomain.domain.com - domain.com/posts/helloworld.aspx
firstsubdomain2.domain.com - domain.com/posts/helloworld2.aspx
firstsubdomain3.domain.com - domain.com/posts/helloworld3.aspx

Thank you in advance for working example. I'm using asp.net 3.5, C#, Windows Server 2008, IIS 7

Just want to make sure creating additional websites in IIS solution will not work for me.

In IIS, create a new website. In the setup wizard, define the host header as your subdomain name (firstsubdomain.com), set the port number and IP address to be used accordingly. In the next step, select the folder you want to be the root folder of the website. If the default content page is going to be something other than one of the standard page names (default.aspx, for instance) then you can set that in the Documents tab of the website.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM