我有一個MVC5 web應用程序映射到域www.example.com。我在webapp中使用基於{area}/{controller}/{action}
的路由,需要將子域映射到特定的路由。與IIS重寫的域特定的ASP.NET MVC5路由
例如:
subdomain.example.com
需要從http://example.com/area/controller/action
Ofcourse路線始終服務器含量與ASP.NET路由MVC5工作,也需要保留,因此所有的查詢參數和「hashbang」數據即:
http://subdomain.example.com#/somethinghere?var=value
重定向從http://example.com/area/controller/action#/somethinghere?var=value
內容因此問題是:這是可以實現的與IIS路由/重寫和如果s o,怎麼樣?另一個選擇是編寫自定義的MVC5路由綁定到一個域,我希望看到有人指出我正確的方向。