/etc/map.publish, URL rewriting, one dispatcher, and multiple domains pointing to the same web site: is it possible?
Hi,
Let's assume that we have a website stored under /content/acme/site-1.
We want this site to be accessible via preview-site-1.acmesites.com as well as site-1.com.
Our deployment has only one dispatcher in front of publisher instances.
Right now this is causing some issues for us: As content for both preview-site-1.acmesites.com and site-1.com are both stored under, e.g., /htdocs/acme/site-1, the content for the domains are over-writing each other.
So when there's a link such as <a href="https://forums.adobe.com/content/acme/site-1/contact-us">Contact Us</a> in the home page, for example, depending on the order of the entries in /etc/map.publish it might be transformed into
- <a href="site-1.com/site-1/contact-us">Contact Us</a>, or
- <a href="preview-site-1.acmesites.com/contact-us">Contact Us</a>.
And the same link will be used on both web sites.
So the user might go to site-1.com, click on the link, and unexpectedly be transferred to preview-site-1.acmesites.com/contact-us.
I have a couple of questions:
- Is /etc/map-based URL rewriting powerful enough to handle the scenario above with only one dispatcher instance?
- If so, what am I missing? How should I configure AEM for the scenario above?
Plus: somehow similar, is it possible to configure /etc/map so that both site-1.com (without www) as well as www.site-1.com can be processed by the URL rewriting system, without having duplicate sling:Mapping entries for the naked and non-naked domains?
Thanks in advance.