url重写—实现html伪静态后 真实的html无法访问的解决方法

 

1.在iis重写配置  网站 右击属性  主目录 配置里面 映射中

查看确认文件是否没选中

2.在web.config里面

在system.web节点下面添加

<compilation debug="true" targetFramework="4.0">
      <buildProviders>
        <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
      </buildProviders>

</compilation>

  <httpHandlers>
      <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
    </httpHandlers>

 

这样就问题就可以解决了

posted @ 2012-08-03 17:32  ElaineHappy  阅读(499)  评论(0编辑  收藏  举报