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