The documentation you are referencing is for resolving a request to a resource in the repository, not for script resolution.
The script resolution documentation is at http://sling.apache.org/documentation/the-sling-engine/url-to-script-resolution.html. To my knowledge the API doesn't support modifying the resource type based on a header value. You'd probably want to perhaps using a selector instead of a header value (or using a rewrite rule to turn the header value into a selector) and then use selector specific scripts to meet your requirements. Paul McMahon Acquity Group - Part of Accenture Interactive On Thursday, October 31, 2013 10:32 AM, Alessandro Bologna <alessandro.bolo...@gmail.com> wrote: Hi, I am pretty sure that the answer is simple enough, but somehow I couldn't find it in the documentation. Say that I have a resource /content/shared/foo with sling:resourceType myapp/page, which will cause a request to invoke scripts at /apps/myapp/page. For requests that have a specific header, say "Host:otherapp", I want instead to use scripts located at /apps/myotherapp/page. Short of duplicating the resource, what's the best practice to implement this? It doesn't seem that the mapping at[1] would help be because in the end I need to change the base path of the resourceType... Thanks Alessandro [1] https://cwiki.apache.org/confluence/display/SLING/Flexible+Resource+Resolution