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

只谈情不闲聊 提交于 2019-12-08 07:00:19

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!