[
https://issues.apache.org/jira/browse/SLING-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649363#action_12649363
]
Felix Meschberger commented on SLING-249:
-----------------------------------------
My current approach is to add a mapping configuration like for the existing URL
mapping.
The basic form would be:
www.domain1.com-/domain1
otherdomain.com-/other
This would map www.domain1.com to /domain and otherdomain to /other.
We could also assume these mappings to be regular expressions, eg.
(www.)?domain1.com-/domain1
otherdomain.com-/other
which would map both www.domain1.com and domain1.com to /domain1
This would of course present some reversemapping issues in that it is unclear
how to reverse map a resource /domain1/statics/site.css. So we would have
(www.)?domain1.com>/domain1
www.domain1.com</domain1
otherdomain.com-/other
Thus splitting incoming and outgoing mapping.
Of course another approach without using regular expressions would be to use
multiple entries mapping to the same root path:
www.domain1.com-/domain1
domain1.com-/domain1
otherdomain.com-/other
Here resolution of incoming requests would still resolve domain1.com and
www.domain1.com to /domain1. But reverse mapping would map
/domain1/statics/site.css to www.domain1.com/statics/site.css since the
mappings are applied in a first-match-applies approach.
WDYT ?
> 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.