首页 > 代码库 > C# mvc3 mvc4 伪静态及IIS7.5配置

C# mvc3 mvc4 伪静态及IIS7.5配置

mvc3 mvc4路由配置  

//单独路由  

routes.MapRoute(
    name: "XXX",
    url: "Home/XXX.html/{id}",
    defaults: new { controller = "Home", action = "XXX", id = UrlParameter.Optional }
);

或者
//全站路由
routes.MapRoute(
   name: "Default",
   url: "{controller}/{action}.html/{id}",
   defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);

IIS7.5 配置

处理映射程序-》