简体   繁体   English

针对同一站点IIS 7的两个子域的不同默认文档

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

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... 但是在IIS中,默认文档设置基于web.config,因此...

We know that we could use the http:/subdomain/page.aspx but its a requirement that we use only http:/subdomain in the links 我们知道我们可以使用http:/subdomain/page.aspx,但要求在链接中仅使用http:/ subdomain

Desired example: 所需示例:

  • Click in link http:/subdomain1.web.com --> http:/subdomain1.web.com/page1.aspx (our_website/page1.aspx) 单击链接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) 单击链接http:/subdomain2.web.com-> http:/subdomain2.web.com/page2.aspx(our_website / page2.aspx)

只需使用相同的默认文档,并根据请求的域在Page_Load中编写重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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