更新时间:2023-02-17 08:58:49
试试这个:
private void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute("default", "{controller}/{action}/{id}",
new { action = "index", id = "" },
// Register below the name of all the other controllers
new { controller = @"^(account|support)$" });
routes.MapRoute("home", "{action}",
new { controller = "device", action = "index" });
}
例如。 /富
如果富
是不是一个控制器,那么它当作的行动装置
控制器。
If foo
is not a controller then it's treated as an action of the device
controller.