[
https://issues.apache.org/jira/browse/SLING-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649366#action_12649366
]
Bertrand Delacretaz commented on SLING-249:
-------------------------------------------
> how about introducing a nodetype called "domainroot":
> [sling:domainRoot]
> mixin
> - sling:domains (string) multiple
> Then a domain root would be resolved by doing a query like
> //*[contains(sling:domains, request.getHeader("Host"))]
I like this idea, it is similar to how we treat the vanityUrl stuff - and as
the domain mappings have to do with specific content trees, it makes perfect
sense to me to have this info in the content as opposed to OSGi configs.
It might seem more costly than a regexp-based configuration, but this
domainRoot info is easy to observe and cache: the mapper does a query on
sling:domainRoot when it starts, disables itself if not found, and observes
that node type for future updates.
> Allow mapping nodes to internet domains
> ---------------------------------------
>
> Key: SLING-249
> URL: https://issues.apache.org/jira/browse/SLING-249
> Project: Sling
> Issue Type: New Feature
> Components: Engine
> Affects Versions: JCR Resource 2.0.2
> Reporter: Vidar S. Ramdal
> Assignee: Felix Meschberger
> Fix For: JCR Resource 2.0.4
>
>
> Sling should support hosting multiple domains, with different JCR roots.
> E.g.:
> http://www.domain1.com could map to /content/domain1.com
> http://www.domain2.com could map to /content/domain2.com
> While developing a website, the fully qualified domain might not be
> available. Ideally, the mapping could be configured in a flexible way. One
> option would be to maintain a set of regular expressions to match against
> URLs. Each regexp would then match to a path in the JCR.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.