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>

相关文章:

  • 2021-12-26
  • 2021-11-07
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2021-06-09
  • 2021-09-01
  • 2021-06-23
  • 2021-12-21
相关资源
相似解决方案