You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Jörg Hoh <jh...@googlemail.com> on 2013/01/09 22:40:04 UTC
Sling mapping & alias hostnames
Hi,
I have multiple domains which should share the same sling mappings, let's
say it's our production system and the QA system. For both I want to have
the very same settings, but we don't want to maintain it twice. Is there a
way to have a structure via
/etc/map/http/www.ourdomain.com/...
and
/etc/map/http/www.anotherdomain.com/
being a kind of alias, which is internally then linked to /etc/map/http/
www.ourdomain.com/ and for which all the mappings specified there are
applied automatically? Any hint, if this is possible?
The documentation on
http://sling.apache.org/site/mappings-for-resource-resolution.html does not
mention such a feature. I am also not that familiar with the code, at least
I haven't found it mentioned explicitly there.
kind regards,
Jörg
Re: Sling mapping & alias hostnames
Posted by Felix Meschberger <fm...@adobe.com>.
Hi,
We have support for a sling:match property in any of the mapping definition nodes. This property may bei a plain string or a regular expression. The problem is that a regular expression has some drawbacks when it comes to create the mapping for the ResourceResolver.map call.
I could imagine, that supporting multiple values for the sling:match property would solve your problem while still maintaining the ability to easily generate the mappings for ResourceResolver.map.
Currently the sling:match property is single-valued, so this would be an enhancement which you might want to request with an issue...
Regards
Felix
Am 09.01.2013 um 22:40 schrieb Jörg Hoh:
> Hi,
>
> I have multiple domains which should share the same sling mappings, let's
> say it's our production system and the QA system. For both I want to have
> the very same settings, but we don't want to maintain it twice. Is there a
> way to have a structure via
>
> /etc/map/http/www.ourdomain.com/...
>
> and
>
> /etc/map/http/www.anotherdomain.com/
>
> being a kind of alias, which is internally then linked to /etc/map/http/
> www.ourdomain.com/ and for which all the mappings specified there are
> applied automatically? Any hint, if this is possible?
>
> The documentation on
> http://sling.apache.org/site/mappings-for-resource-resolution.html does not
> mention such a feature. I am also not that familiar with the code, at least
> I haven't found it mentioned explicitly there.
>
> kind regards,
> Jörg