html URLRewriter生成静态页不能访问

IIS配置伪静态页

网站右键属性-->目录-->配置-->添加-->选择

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

扩展名.html 去掉确认文件是否存在对勾点击确定重起IIS

加上以下代码就可以访问了

<compilation debug="true">

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

 <httpHandlers>

 <!--配置伪静态页开始-->
      <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
      <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
      <!--配置伪静态页结束-->
</httpHandlers>

原文地址:https://www.cnblogs.com/freexiaoyu/p/2041968.html