Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Luyolo Mgodi 71 posts 120 karma points
    Jun 24, 2015 @ 10:45
    Luyolo Mgodi
    0

    umbraco dynamic friendly url

    Good day,

    I am building an Umbraco website using v7, however I'm extending the website. For a section of the website, I am consuming data from a XML Api. I am using the Umbraco Api Controller and call the API to return data. However i need to have the data coming from the API to have friendly URLs for SEO reasons. For example, this is an accommodation API so I need to be able to display a particular accommodation using a friendly url like www.mywebsite.com/accommodation/accomodation-name instead of www.mywebsite.com/?accommodationId=876.

    Also, when I list accommodations in a certain region or town to have a url like: www.mywebsite.com/region-name and not www.mywebsite.com/?regionid=45

    Thanks

  • Sören Deger 733 posts 2844 karma points c-trib
    Jun 24, 2015 @ 11:21
    Sören Deger
    0

    Hi Luyolo,

    maybe UrlRewriting can help you? Have a look at /config/urlrewriting.config. You can find into the file a description how you can use this.

    Hope this helps?

    Best, Sören

  • Luyolo Mgodi 71 posts 120 karma points
    Jun 24, 2015 @ 11:34
    Luyolo Mgodi
    0

    Hi Sören,

    I will have a look at that file and will feedback.

    Regards, Luyolo

  • Rik Helsen 670 posts 873 karma points
    Jun 24, 2015 @ 11:46
    Rik Helsen
    0

    You can also use UmbracoAlias if every node just needs one alternative URL: https://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlalias

    Or 301 redirect module: https://our.umbraco.org/projects/developer-tools/301-url-tracker

    or you could do a structural approach using the config file sören mentions ;)

  • Luyolo Mgodi 71 posts 120 karma points
    Jun 24, 2015 @ 11:57
    Luyolo Mgodi
    0

    Hi Rik,

    I don't think the 301 URL Tracker would be practical for what I need to do. I am consuming an API that has 100s to 1000s of establishments/accommodations. It would be impractical to have to set up these URLs in the CMS, as I understand that you have to set up the URLS for the URL Tracker in the CMS .

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 24, 2015 @ 12:54
    Dave Woestenborghs
    0

    Another option is to create a VirtualNodeHandler for this.

    James South wrote a excellent article about it : http://jamessouth.me/archive/fun-with-umbracovirtualnoderoutehandler/

    Dae

  • Luyolo Mgodi 71 posts 120 karma points
    Jun 24, 2015 @ 13:11
    Luyolo Mgodi
    0

    Thanks Dave,

    Will check the article out!

    Best.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 24, 2015 @ 13:13
    Dave Woestenborghs
    0

    Shannon also has a article about it.

    http://shazwazza.com/post/Custom-MVC-routes-within-the-Umbraco-pipeline

    And he has a early version of it in his Articulate blog package : https://github.com/Shazwazza/Articulate/tree/master/Articulate

    Dave

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies