I have a Umbraco installation hosting several domains www.aaa.com, www.bbb.com, www.ccc.com. And I like to have the aaa-site serv some data on a /api - path. Easy to do by reserving the path with umbracoReservedPaths.
But, I like it to be hidden from the other sites. So if a user goes to www.bbb.com/api he/she should se an ordinary umbraco site page. And since umbracoReservedPaths is global I cannot see how I could use that one.
My solution - if I cannot find anything better - will probably be exposing /api/ and check the requested domain in my api, and only serve the resources for www.aaa.com , the others will get 404's
Thanks David, UrlRewriter it is. I re-read the docs and experimented some, it's great to have in the tool belt, for all kinds of special routing needs in Umbraco. I'll get back here or perhaps in a blog post to write about my experiences with it.
Exposing api's, but only for 1 of the domains
Hi
I have a Umbraco installation hosting several domains www.aaa.com, www.bbb.com, www.ccc.com. And I like to have the aaa-site serv some data on a /api - path. Easy to do by reserving the path with umbracoReservedPaths.
But, I like it to be hidden from the other sites. So if a user goes to www.bbb.com/api he/she should se an ordinary umbraco site page. And since umbracoReservedPaths is global I cannot see how I could use that one.
Any ideas how to accomplish this?
Regards
Jonas
My solution - if I cannot find anything better - will probably be exposing /api/ and check the requested domain in my api, and only serve the resources for www.aaa.com , the others will get 404's
Hi Jonas,
you can use UrlRewriting for the other domains (the bbb and ccc) and serve them a "page not found"
Rgds,
David
Thanks David, UrlRewriter it is. I re-read the docs and experimented some, it's great to have in the tool belt, for all kinds of special routing needs in Umbraco. I'll get back here or perhaps in a blog post to write about my experiences with it.
is working on a reply...