×

urlwriter html

启用URL重定重写,已存在静态文件打不开的解决方案

管理员 管理员 发表于2010-03-06 03:22:34 浏览2695 评论0

抢沙发发表评论

//web.config

//1、添加配置节点

<httpHandlers>

<!--设置应用程序映射(url重写后要加的)-->
   <add path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true"/>
  </httpHandlers>

//2、还有<compilation>下插入
   <!--设置应用程序映射(url重写后要加的)-->
   <buildProviders>
    <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
   </buildProviders>

//这样就能打开原本的.html后缀的名称了

群贤毕至

访客