zoukankan      html  css  js  c++  java
  • urlrewriter url重写 伪静态配置

    一、引入URLRewriter.dll和ActionlessForm.dll

    二、webconfig修改

    在<configuration>里面添加<configSections>
      <configSections>
        <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
      </configSections>

    在<system.web>的<httpHandlers>里面添加

    <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
    <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />

    <configuration>里面添加

    <RewriterConfig>
        <Rules>
          <RewriterRule>
            <LookFor>~/a\.html</LookFor>
            <SendTo> ~/a.aspx</SendTo>
          </RewriterRule>

    </Rules>
      </RewriterConfig>

    三、iis设置

    属性 主目录 配置 添加

    可执行文件:c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
    扩展名:.html

    去掉勾选确认文件是否存在

    用心写代码,不辜负程序员之名。
  • 相关阅读:
    lua math 库
    【转】Lua 操作系统库
    lua学习笔记(十三)
    lua学习笔记(十二)
    lua学习笔记(十一)
    lua学习笔记(十)
    lua学习笔记(九)
    lua学习笔记(八)
    lua学习笔记(七)
    lua学习笔记(六)
  • 原文地址:https://www.cnblogs.com/thinkingthigh/p/2772779.html
Copyright © 2011-2022 走看看