使用子域完全从主站点Mvc 3中分离出区域

时间:2014-09-28 11:25:57

标签: asp.net-mvc asp.net-mvc-4 asp.net-mvc-5 asp.net-mvc-areas asp.net-mvc-3-areas

我的区域为Admin。并且它有一个控制器SigninController。现在这个区域是管理区域。我应该将其映射为http://admin.localhost/

现在发生了什么我在root中也有一个SigninController。所以我目前必须调用管理员登录为http://localhost:80/Admin/Signin。对于root http://localhost/Signin

我想要的是将管理区域完全分开,除非它被子域调用。

即使偶然是http://localhost:80/admin/signin,我也不希望使用该网址。他不应该被路由到管理登录区域。它应该只能通过子域url,即通过

获得

http://admin.localhost:80/Admin/Signinhttp://admin.localhost:80/Signin

当请求URL通过子域配置而不是来自url中具有区域名称的项目的根时,应始终调用区域signin。

如何做任何指导?

0 个答案:

没有答案