right now I can access a node with the following URLs (at least):
- nodeName.aspx
- nodeName
- nodeName/
how do I setup urlrewriting so all other requests for the node will permanently redirect to "nodeName/" ? I want to do it, because Google will see the above three URLs as three different pages and think it is duplicate content.
This will match string like 'nodename.aspx' and 'nodename' (without an ending slash). They both capture 'nodename', so you'll have to redirect to '{R:1}/' which means '<group1>/'.
redirecting a node to a single url
Hi
right now I can access a node with the following URLs (at least):
- nodeName.aspx
- nodeName
- nodeName/
how do I setup urlrewriting so all other requests for the node will permanently redirect to "nodeName/" ? I want to do it, because Google will see the above three URLs as three different pages and think it is duplicate content.
thanks
Thomas
Hi Thomas,
I've put together a regex for you to do this:
^([^/]+?)(?:\.aspx)?$
This will match string like 'nodename.aspx' and 'nodename' (without an ending slash). They both capture 'nodename', so you'll have to redirect to '{R:1}/' which means '<group1>/'.
Greets.
Hi kipusoep
thanks for the regex.
I ended up using the rewrite URLs at http://umbraco.miketaylor.eu/2010/11/03/url-rewriting-and-seo/ since they cover all the things I need.
best regards
Thomas
is working on a reply...