Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can URL ReWrite in ASP.NET
ex-
Main URL :- http://www.mytest.com/products.asp?id=342
URL Rewrite:- http://www.mytest.com/products/342/
Posted

 
Share this answer
 
Comments
Uday P.Singh 17-Apr-12 3:30am    
5!
sravani.v 17-Apr-12 3:31am    
Thank you Uday
 
Share this answer
 
Comments
Uday P.Singh 17-Apr-12 3:30am    
5!
P.Salini 17-Apr-12 3:32am    
Thanks Uday :-)
Mohammad A Rahman 17-Apr-12 6:28am    
Great
P.Salini 17-Apr-12 6:29am    
Thanks Rahman
This[^] will also help you ...
 
Share this answer
 
for that u have to put one dll file in your project and some change in web.config file. aspnet_isapi.dll. add this file.

XML
<configuration>
  <system.web>
        <urlrewrites>
            <rule>
                <url>/urlrewriter/show\.asp</url>
                <rewrite>show.aspx</rewrite>
            </rule>
            <rule>
                <url>/urlrewriter/wohs\.asp</url>
                <rewrite>show.aspx</rewrite>
            </rule>
            <rule>
                <url>/urlrewriter/show(.*)\.asp</url>
                <rewrite>show.aspx?$1</rewrite>
            </rule>
            <rule>
                <url>/urlrewriter/(.*)show\.html</url>
                <rewrite>show.aspx?id=$1&amp;cat=2</rewrite>
            </rule>
            <rule>
                <url>/urlrewriter/s/h/o/w/(.*)\.html</url>
                <rewrite>/urlrewriter/show.aspx?id=$1</rewrite>
            </rule>
        </urlrewrites>
    </system.web>
</configuration>



<configuration>
<configsections>
<sectiongroup name="system.web">



 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900