ssplyh 发表于 2017-12-28 13:41:15

MVC 伪静态html页面的访问

  不需要配置IIS来实现
  1. 路由配置
  context.MapRoute(
  name: "Default",
  url: "{controller}/{action}/{id}.html",

  defaults: new { controller = "Home", action = "Index",>  );
  2.Web.config设置如下节点
  <system.webServer>
  <modules runAllManagedModulesForAllRequests="true"></modules><!--关键-->
  </system.webServer>
页: [1]
查看完整版本: MVC 伪静态html页面的访问