开发者

Different default documents for two subdomains that go against the same site IIS 7

开发者 https://www.devze.com 2023-01-16 10:41 出处:网络
We have two subdomains for the same 开发者_如何学运维site, we would like that depending on the visited subdomain the initial page varies. But in IIS the default document setting is based on the web.co

We have two subdomains for the same 开发者_如何学运维site, we would like that depending on the visited subdomain the initial page varies. But in IIS the default document setting is based on the web.config so...

We know that we could use the http:/subdomain/page.aspx but its a requirement that we use only http:/subdomain in the links

Desired example:

  • Click in link http:/subdomain1.web.com --> http:/subdomain1.web.com/page1.aspx (our_website/page1.aspx)
  • Click in link http:/subdomain2.web.com --> http:/subdomain2.web.com/page2.aspx (our_website/page2.aspx)


Just use the same default document and write a redirect in Page_Load based on which domain is requested.

0

精彩评论

暂无评论...
验证码 换一张
取 消