1

in Umbraco I have a link:

/living/travel/2012/december/costa-del-christmas/

Is it possible to access it by removing the dates 2012/december? The URL would result in the following:

/living/travel/costa-del-christmas/

At the moment I get a 404 error when doing this.

Does anyone have any ideas how to solve this problem?

Thanks

1 Answer 1

4

One way would be to use the umbracoUrlAlias method.

http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlalias

Add a new property to your DocumentType with an alias of umbracoUrlAlias and make it a text string type. Then on the content you can assign any alternate url to that content and they will resolve to the same page.

You may want to add some meta information to deal with canonical links as well so Google doesn't think you have duplicate content.

4
  • Couldn't have said it better myself. Jan 22, 2013 at 18:27
  • Thanks! Off topic: I haven't seen you around on Twitter, but I'd love to see you join the N. American Umbraco Users Group (nauug.com)
    – BeaverProj
    Jan 22, 2013 at 23:15
  • This looks like an OK solution but there are thousands of pages, so I would like it to be automated as opposed to typing in the URL each time a page is created.
    – Funky
    Jan 23, 2013 at 10:13
  • 1
    @Funky, you could set the umbracoUrlAlias programmatically in the before publish event, or any event for that matter - see our.umbraco.org/wiki/reference/api-cheatsheet/…. Jan 23, 2013 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.