You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Róbert Csákány (JIRA)" <ji...@apache.org> on 2009/12/10 17:02:18 UTC
[jira] Updated: (SLING-1198) Allow mapping nodes to internet
domains with template parameters
[ https://issues.apache.org/jira/browse/SLING-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Róbert Csákány updated SLING-1198:
----------------------------------
Attachment: MapEntry.pacth
Here is the modified patch I mentioned before. There is a new feature, @noparam@ in Map entries to be able to resolve shared node entries. Here is an (real life) example:
/etc/map/http/domain1.com
--- jcr:primaryType=sling:Mapping
sling:internalRedirect=/users/@par(1,\w+)@
sling:match=@par(1,\w+)@\.domain1\.com.8080
/etc/map/http/domain1.com/images
--- sling:internalRedirect=@noparam@/content/shared/images/
/etc/map/http/domain1.com/css
--- sling:internalRedirect=@noparam@/content/shared/css/
cases:
Resolver:
1. http://test1.domain1.com/index.html -> /users/test1.domain1.com/index.html
2. http://test2.domain1.com/images/glass.jpg -> /content/shared/images/glass.jpg
Map:
1. /users/test1.domain1.com/index.html -> http://test1.domain1.com/index.html
2. /content/shared/images/glass.jpg -> /content/shared/images/glass.jpg
That's all folks :)
> Allow mapping nodes to internet domains with template parameters
> ----------------------------------------------------------------
>
> Key: SLING-1198
> URL: https://issues.apache.org/jira/browse/SLING-1198
> Project: Sling
> Issue Type: New Feature
> Components: JCR
> Affects Versions: JCR Resource 2.0.2
> Reporter: Róbert Csákány
> Assignee: Felix Meschberger
> Fix For: JCR Resource 2.0.4
>
> Attachments: MapEntry.pacth, MapEntry.patch
>
>
> 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.