zoukankan      html  css  js  c++  java
  • UrlReWriter 在web.config中简单的配置

    1.配置的第一个节点

    <configSections>
        <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,Intelligencia.UrlRewriter"/>
    </configSections>

    2.配置的第二个节点

    <httpModules>    
          <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" />
    </httpModules>

    3.配置的第三个节点(ASP.NET4.0才需要)

    <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
              <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
        </modules>
    </system.webServer>    

    4.编写规则

      <rewriter>
        <rewrite url="~/about.html" to="~/Default.aspx" processing="stop" />
        <rewrite url="^.*-d([0-9]+)/?$" to="~/Default.aspx?ID=$1" processing="stop" />
      </rewriter>

    这规则主在<configSections>后面

    5.设置IIS

    网站——属性——主目录——配置——在通配符应用程序映射中点插入——在可执行文件中,浏览(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll)当你的网站是.Net2.0的,

  • 相关阅读:
    Stack的一种简单实现
    Allocator中uninitialized_fill等函数的简单实现
    Allocator的简易实现
    编写自己的迭代器
    简单的内存分配器
    vector的简单实现
    异常类Exception
    intent大致使用
    java初识集合(list,set,map)
    php分页
  • 原文地址:https://www.cnblogs.com/ljx2012/p/2754869.html
Copyright © 2011-2022 走看看