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
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 .
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
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
Hi Sören,
I will have a look at that file and will feedback.
Regards, Luyolo
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 ;)
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 .
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
Thanks Dave,
Will check the article out!
Best.
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
is working on a reply...