Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I look for how to get content (ideal from cache) by URL with multiple hostnames in custom API controller UmbracoApiController. I was find method UmbracoContext.Content.GetByRoute but I don't know how to get content for specific hostname / domain.
For example, how find content for example.com/en/home and anotherdomain.com/en/home. Content this pages is not the same.
If i set this url to parameter in function UmbracoApiController then I always getnull or error.
If you have specific multiple custom hostnames set on your Umbraco site to different root nodes in the content tree - then you can still use GetByRoute..
but you need to prefix the relative path you are looking for with the id of the Root node for that site domain..
where 1234 is the id of root node for one site, and 1235 is the root node for another...
I know this is a V7 package PageNotFoundManager by TimGeyssens, but this code gives you a bit of a gist of how the GetByRoute works in a multi site Umbraco implementation.
Hope that helps steer in the right direction.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted