zoukankan      html  css  js  c++  java
  • URL伪静态

    用URLRewriter进行伪静态配置,webconfig的配置如下:

    代码
    <?xml version="1.0"?>
    <configuration>
      
    <configSections>
        
    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
      
    </configSections>
      
    <RewriterConfig>
        
    <Rules>
          
    <RewriterRule>
            
    <LookFor>~/jifenmingxi.html</LookFor>
            
    <SendTo>~/jifenmingxi.aspx</SendTo>
          
    </RewriterRule>
          
    <RewriterRule>
            
    <LookFor>~/jifenmingxi_(\d).html</LookFor>
            
    <SendTo>~/jifenmingxi.aspx?page=$1</SendTo>
          
    </RewriterRule>
              
    </Rules>
      
    </RewriterConfig>

      
    <connectionStrings>
           
    <add name="connstr" connectionString="server=192.168.0.*;uid=*;pwd=*;database=*;pooling=false;" providerName="System.Data.SqlClient"/>
      
    </connectionStrings>
      
    <system.web>
        
    <!--该配置对于伪静态很重要-->
        
    <httpModules>
          
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
          
    <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
        
    </httpModules>
      
    </system.web>
    </configuration>
  • 相关阅读:
    第12-13周总结
    排球比赛计分规则
    我与计算机
    排球比赛计分规则-三层架构
    怎样成为一个高手 观后感
    最后一周冲刺
    本周psp(观众页面)
    本周psp(观众页面)
    本周工作计量
    本周总结
  • 原文地址:https://www.cnblogs.com/jxcia_Lai/p/1765018.html
Copyright © 2011-2022 走看看