I am using Intelligencia.UrlRewriter for URL rewrite appending

308 Views Asked by At

I am using Intelligencia.UrlRewriter for URL rewrite in my asp.net application. My URL structure is like www.example.com/media/index.html. I am facing a big problem with URL rewrite, whatever append with the above mentioned url its taking to same page.How can i prevent append apart from ? and / My URL rewrite code as follows.

<rewrite url="^/media/index.html" to="~/admin/media.aspx" /> 

if i type /media/index.htmltestt then also its displaying same page. How can i solve this issue. Please help me

1

There are 1 best solutions below

0
rakesh pakkam On

I resolved the issue by replacing ~[Tilde] with ^[Caret] symbol to stop the appending url in start and used $ in the URL end

The above URL will not append anything before other than domain name and it won't accept anything after html without ?.