mvc2/3/4_伪静态_路由配置
2014-02-21 14:46
204 查看
一、路由规则:
routes.MapRoute(
name: "Default2",
url: "{controller}/{action}.html/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
默认:routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
完成以上还不足够,还需要在webconfig配置:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
routes.MapRoute(
name: "Default2",
url: "{controller}/{action}.html/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
默认:routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
完成以上还不足够,还需要在webconfig配置:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
相关文章推荐
- 静态路由与默认路由的配置(三路由二PC)
- 静态路由的配置
- HCNA——IP路由原理、静态路由基本配置
- 静态路由与默认路由的配置
- 路由配置系列之静态路由
- 帧中继配置之静态路由与ospf
- 静态路由与默认路由的配置
- 华为静态、默认、备用路由配置
- 59、IPv6配置实验之静态路由
- 配置不同网段静态路由,实现互联互通。
- Spring Boot 静态资源映射与上传文件路由配置
- 手动配置静态默认路由
- 静态路由的配置
- 静态路由的配置
- asp.net mvc 伪静态路由配置
- php 开启伪静态 配置路由规则
- Swift3.0服务端开发(二) 静态文件添加、路由配置以及表单提交
- IPV6 静态默认RIng路由配置
- 静态路由的配置命令(拓扑图)