Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using asp.net 4.0 and iis 7. I am using Intelligencia dll to perform url rewriting . I have a user control which has the links to different pages. in web.config file i have written below code

XML
<rewriter>
    <rewrite url="~/(Product1/)*" to="~/Product.aspx?category=$1" />
  </rewriter>

for urlrewriting. it just works fine first time but from next page load. the url is rewritten and another /Product gets appended in the link.
For first time the link is http://localhost:1789/WebSite1/Product1/DVD
but after i click on this link second time onwards the link is http://localhost:1789/WebSite1/Product1/Product1/DVD.

The Product1 word is getting added for every page load.
Posted

1 solution

hi , please try below code..

<rewriter>
    <rewrite url=" ../(Product1/)*" to=" ../Product.aspx?category=$1" />
  </rewriter>
 
Share this answer
 
Comments
Shining Legend 22-Sep-10 6:05am    
it does not work. It says resource cannot be found.

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