I've got a new site where the URLs from the old site needs to be 301 redirected. For this I've set up a rewrite map and added a rewrite rule for it.
Thing is, with my current rewrite rule, appending a trailing slash to the old URL doesn't match the value in the rewrite map (because URLs there aren't with a trailing slash)
Snippet from my rewrite map:
<rewriteMap name="Redirects">
<add key="myolddomain.com/page/subpage" value="mynewdomain.com/da/subpage/" />
... and a whole lot more
</rewriteMap>
Does anyone know if there's any way to make this rule match the URL, but with a trailing slash, like so: myolddomain.com/page/subpage/ Have to admit my regex skills aren't the best ;-)
URL rewrite map match optional trailing slash
Hi all,
I've got a new site where the URLs from the old site needs to be 301 redirected. For this I've set up a rewrite map and added a rewrite rule for it.
Thing is, with my current rewrite rule, appending a trailing slash to the old URL doesn't match the value in the rewrite map (because URLs there aren't with a trailing slash)
Snippet from my rewrite map:
and my (rather simple) rule is as follows:
Does anyone know if there's any way to make this rule match the URL, but with a trailing slash, like so: myolddomain.com/page/subpage/ Have to admit my regex skills aren't the best ;-)
Thanks a lot in advance.
All the best,
Bo
Anyone ? :-D
Hi Bo,
Something like:
is working on a reply...