Then it works with www.domain.com/summer & www.domain.com/summer/ but then I hit another issue. Inside umbraco. My client have another node called summer14. so www.domain.com/summer14 . Now since I've added my last update to <add> the summer14 node is also being redirected. and the end url for some reason is: www.newdomain.com/14/
Is there a way to tell UrlRewriting.config to only redirect summer and summer/ ?
So adding [/] matches a single slash - adding a ? to make it optional and then finally put a $ on the end to match the end of the string, essentially matching an optional trailing slash:
UrlRewriting with and without trailing slash
Greetings!
First of all the Umbraco version that I'm currently working on is : v 4.7.2 .
My clint wants to redirect www.domain.com/summer/ to www.newdomain.com/
So I added following line into UrlRewriting.config
But that doesn't include www.domain.com/summer , so if I change the <add> to:
Then it works with www.domain.com/summer & www.domain.com/summer/ but then I hit another issue. Inside umbraco. My client have another node called summer14. so www.domain.com/summer14 . Now since I've added my last update to <add> the summer14 node is also being redirected. and the end url for some reason is: www.newdomain.com/14/
Is there a way to tell UrlRewriting.config to only redirect summer and summer/ ?
Hi Srdjan,
If you end the RegEx with a dollar sign, it will only match the end of the string, so add a $ on the end and see how that works.
/Chriztian
Hi Srdjan,
Just had a need to figure this out for realz :-)
So adding
[/]
matches a single slash - adding a?
to make it optional and then finally put a$
on the end to match the end of the string, essentially matching an optional trailing slash:/Chriztian
is working on a reply...