I am having trouble with a pesky URL rewrite, the URL ~/global/products/en/page?sdfsdf=sgdfg
works perfectly without the query string but wont work with it. Can anybody help? The mobile site ~/global/products/en/m/page
uses the same rules which is why there is the [a-zA-Z0-9/_-]*?
in the middle. Rule 6 is my attempt to fix it but I am awful at regex in general so any help would be most appreciated.
<add name="rule1"
virtualUrl="^~/[a-z-]*/([a-zA-Z0-9/_-]*?[^\.])$"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/country/$1.aspx"
ignoreCase="true" />
<add name="rule2"
virtualUrl="^~/[a-z-]*/([a-zA-Z0-9/_-]*?)(.+)\?(.*)$"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/country/$1.aspx?$2"
ignoreCase="true"/>