问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/4287232/how-to-map-subdomain-to-the-subfolder-without-creating-additional-websites-in-ii