Last post Apr 28, 2014 04:43 AM by Starain chen - MSFT
Apr 25, 2014 11:06 PM|raghavrkapoor|LINK
I am looking to route the all subdomain requests to the same Application under IIS 7 Default Website.
I have developed a Multi Tenant Application using ASP.Net MVC4. Website is mainly build considering a subdomain for every Tenant.
Main Domain: www.test.com (this will be mapped to Default Web Site in IIS)
Tenant1 : tenant1.test.com (this will be pointing TestWeb Application under Default Web Site in IIS)
Tenant2 : tenant2.test.com (this will also be pointing TestWeb application under Default Web Site in IIS)
The application is working fine and I am able to achieve the desired output as well.
As of now to access the application:
Tenant1 has to use link like: tenant1.test.com/TestWeb/Admin/GetData
Tenant2 has to use link like: tenant2.test.com/TestWeb/Admin/GetData
What I would like to do is that if client doesn't include TestWeb in the Url and rather only use:
"tenant1.test.com/Admin/GetData" the request should be routed to tenant1.test.com/TestWeb/Admin/GetData
"tenant2.test.com/Admin/GetData" the request should be routed to tenant2.test.com/TestWeb/Admin/GetData
Also, www.test.com should be pointing to
www.test.com only, and not to www.test.com/TestWeb.
I am looking for an approach to achieve the above. Thanks in advance.
Apr 26, 2014 02:36 AM|mike4u|LINK
Apr 28, 2014 04:43 AM|Starain chen - MSFT|LINK
For that scenario, the www.test.com can only be captured by the
Default Web Site. In other words, all rules in the TestWeb website are not working for that URL request.
So, for this requirement, you should add the rule to the Default Web Site to redirect/rewrite to the