URL Rewriting

T

Tony

I want to rewrite URL in asp.net 2.0 but I can't. I wrote this in web config
file:

<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>

But I got message: "Unrecognized configuration section
system.web/urlrewrites." How to fix it?
 
G

Guest

I want to rewrite URL in asp.net 2.0 but I can't. I wrote this in web config
file:

<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>

But I got message: "Unrecognized configuration section
system.web/urlrewrites." How to fix it?

Perhaps you did forget the code? :)

http://www.codeproject.com/aspnet/urlrewriter.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top