/ Published in: XML
web.config
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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&id=$4;&domain=$1" rewrite="Domain" ignoreCase="true" /> <add name="Rewrite" virtualUrl="^~/(.*)/Detail(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Default.aspx?language=$1&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>
URL: http://www.urlrewriting.net/