handling sub-domains in IIS for a web application

假装没事ソ 提交于 2019-12-25 09:47:10

问题


I am have a web application on local IIS (mylocalsite.com)
What settings I need, so that I can handle all subdomains of my local site, like

user1.mylocalsite.com
user2.mylocalsite.com
anything.mylocalsite.com

All urls will point to same index page from where I can seperate subdomain and load page accordingly.


回答1:


Since your description is not that clear, my initial thought would that you can setup different Bindings in IIS to cater for all the subdomains.

In IIS 7, right click your website -> Edit Bindings -> Add..

But my guess would be that you may need to do this from code, since users are added to your system (assuming user/sub-domain model). For this I refer you to

  • Create Binding in in IIS (iis.net)
  • Cool new IIS7 Features and APIs - ScottGu
  • Microsoft.Web.Administration


来源:https://stackoverflow.com/questions/5960442/handling-sub-domains-in-iis-for-a-web-application

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