// global.asax 路由
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
new string[] { "MyApplication.Controllers" } // Controller Namespace
);
// 区域注册路由
context.MapRoute(
MyArea_default,
"MyArea/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional },
new string[] { "MyApplication.Areas.MyArea.Controllers" }
);
当我去http://mydomain.com/controler_in_area仍然工作。如何禁用http://mydomain.com/controler_in_area,我只想作为http://mydomain.com/MyArea/controler_in_area工作