Url重新定向

 

<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
  
<RewriterConfig>
    
<Rules>
      
<RewriterRule>
        
<LookFor>~/Product/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
        
<SendTo><![CDATA[~/Product/default.aspx?ProductType=$1&ProductID=$2]]></SendTo>
      
</RewriterRule>
      
<RewriterRule>
        
<LookFor>~/test/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
        
<SendTo><![CDATA[~/test/Url.aspx?ProductType=$1&ProductID=$2]]></SendTo>
      
</RewriterRule>
    
</Rules>
  
</RewriterConfig>
</configuration>
  
<system.web>
    
<httpModules>
           
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
    
</httpModules>
  
</system.web>

 

这样配置就可以了!

posted @ 2009-02-24 15:28  海底的鱼  阅读(206)  评论(0)    收藏  举报