About the author

Imran Imran
Like Development in DotNet.

E-mail me Send mail
Search Entire Web

Recent Articles

 
1: Master Pages
Category: ASP.Net
Added: 1/31/2008

 
2: Caching with ASP.NET
Category: ASP.Net
Added: 1/31/2008

 
3: Free Microsoft Press E-Book Offer!
Category: ASP.Net
Added: 1/30/2008

 
4: Timer Control in Asp.Net
Category: ASP.Net
Added: 1/29/2008

 
5: Checkbox selection with ajax
Category: ASP.Net
Added: 1/29/2008

 
6: UrlRewriter with asp.net
Category: ASP.Net
Added: 1/19/2008

 
7: Auto complete textbox with Ajax
Category: ASP.Net
Added: 1/15/2008

 
8: Upload file with Asp.Net
Category: ASP.Net
Added: 1/15/2008

 
9: User Rating Technique
Category: ASP.Net
Added: 1/8/2008

 
10: Encryption And Decryption Library
Category: ASP.Net
Added: 1/5/2008

UrlRewriter with asp.net

by Imran 19/January/2008

UrlRewriting is used for display an artificial URL not actual URL. Some days before i found a freeware library for UrlRewrite which is very useful.

 Intelligencia.UrlRewriter.dll.

Edit Web.Config
 

<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.

Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>

<httpModules>

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

</httpModules>

<rewriter>

            <rewrite url="~/Article/(.+).aspx" to="~/Article.aspx?category=$1"/>

</rewriter>

1. (~/Article.aspx?category=$1)

Your actual page in root directory and category is parameter.

2. (~/Article/(.+).aspx)

Artifical URL looks like http://www.yourwebsite.com/Artical/page.aspx

Article.aspx.vb

 Request.QueryString("Category")

You  can download free library from

http://urlrewriter.net/index.php/support/configuration/ 





Powered by DotNetClassic.com