Return to Snippet

Revision: 1954
at November 28, 2006 15:27 by miziomon


Initial Code
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="urlrewritingnet"  
             requirePermission ="false" 
             type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter"  />
  </configSections>

  <urlrewritingnet
    rewriteOnlyVirtualUrls="true"   
    contextItemsPrefix="QueryString" 
    defaultPage = "default.aspx"
    defaultProvider="RegEx"
    xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >
    <rewrites>
      <add name="RewriteOnDomain"  virtualUrl="^http\://(.*)/SampleWeb/domain/(.*)/Detail(.*).aspx"            
           rewriteUrlParameter="ExcludeFromClientQueryString" 
           destinationUrl="~/Default.aspx?language=$3&amp;id=$4;&amp;domain=$1"
           rewrite="Domain" 
           ignoreCase="true" />

      <add name="Rewrite"  virtualUrl="^~/(.*)/Detail(.*).aspx"            
           rewriteUrlParameter="ExcludeFromClientQueryString" 
           destinationUrl="~/Default.aspx?language=$1&amp;id=$2"
           ignoreCase="true" />
      
      <add name="RedirectInApplication"  virtualUrl="^~/(.*)/Default.aspx"            
           rewriteUrlParameter="ExcludeFromClientQueryString" 
           destinationUrl="~/$1/Detail_Redirected.aspx"
           redirect="Application" 
           redirectMode="Permanent"
           ignoreCase="true" />
      
      
      <add name="KickBrowserToDomain"  virtualUrl="^http\://(.*)/SampleWeb/kickto/(.*).aspx"            
           rewriteUrlParameter="ExcludeFromClientQueryString" 
           destinationUrl="http://$2?source=$1"
           redirect="Domain"
           redirectMode="Permanent"
           ignoreCase="true" />
    </rewrites>
  </urlrewritingnet>

  <appSettings/>
  <system.web>
    <customErrors mode="Off">
    </customErrors>
    <httpModules>
      <add name="UrlRewriteModule"
           type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
    </httpModules>
    <compilation debug="true" />
  </system.web>
</configuration>

Initial URL
http://www.urlrewriting.net/

Initial Description
web.config

Initial Title
urlrewriting.net web.config

Initial Tags

                                

Initial Language
XML