Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Sling mappings for more than one site

Avatar

Level 1

Hello,

I am trying to set up a set of sling mappings in AEM 6.0 to work with multiple sites. For example, I want www.sitea.com and www.websitea.com to use the same sling mappings in AEM. I've created two sling:folder nodes in map.publish named http and https. In each of those nodes I am trying to set up the sling mapping. As of right now I have a sling:mapping node named after each site and this is working great. We've been unable to find a way to combine both sling mappings, so www.sitea.com and www.websitea.com use the exact same node.

We've tried naming the sling mapping as:

www.(web)?sitea.com

This works but only for incoming requests. Is there a better method for combining sling mappings when the sites have similar names? The reason for wanting this is we have a very large number of mappings for each site, both sites have the same internal directory paths, and we don't want to change the mappings for each individual site, rather we would like to change the mapping once and have it update for all of the similarly named sites.

2 Replies

Avatar

Level 2
Level 2

If this were to work, I would be curious as to how the links would render....i.e. which site would be the "default" one that generated links would use (if you are using code that puts in the site of course)?