urlrewriting.net and exact match

476 views Asked by At

I am using urlrewriting.net to rewrite my URLs. One of my rules captures "/restaurant", but it seems it is a "contains"-rule in the sense that it will also capture eg. "/restaurant-italia" but I would like it to only capture the exact match "/restaurant".

My rule looks like this:

<add name="city_Restaurant_searchRule" virtualUrl="^~/(.*)/restaurant" destinationUrl="~/search.aspx?cityUrl=$1&amp;category=restaurant" rewriteUrlParameter="ExcludeFromClientQueryString" ignoreCase="true" xmlns="" />

Any help is appreciated

thanks Thomas

1

There are 1 answers

2
Alexey On BEST ANSWER

Maybe adding $ at the end of virtualUrl value will help.