[ 
https://issues.apache.org/jira/browse/SLING-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649350#action_12649350
 ] 

Vidar S. Ramdal commented on SLING-249:
---------------------------------------

That will work.

Another thing: At some point, you'll probably want multiple domains sharing the 
same content root. As mentioned in comment 12569799 above, you'll want 
"www.domain1.com" and "domain1.com" to refer to the same content. There might 
be other cases too, where the two domain names are lexically unrelated, but 
should refer to the same.

So instead of just relying on a simple mapping, 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"))]




> 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.

Reply via email to