Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

etc map for multi domain in aem 6.5

Anoop345
Level 2
Level 2

Hi,

I have 2 domains for my dev environment for which I have created etc/map to shorten the content url.

etc map redirect for both domain is similar like this-

Anoop345_0-1637222852998.png

Anoop345_1-1637222924515.png

Anoop345_2-1637223264084.png

Anoop345_3-1637223328727.png

 

 

 

both domain has same sling:internalRedirect and redirect node.

but when I am generating sitemap.xml on domain am-dev.test.com (using acs common) all my generated pages having domain am-devwaf.test.com and not am-dev.test.com.

why is only one domain's etc/map is getting picked up for url shortening ?

 

1 Reply
Asutosh_Jena_
Community Advisor
Community Advisor

Hi @Anoop345 

 

This is not feasible.

The etc/map settings does not match the origin header of the incoming request, and will stop on the first match it finds for the underlying content path. This is not much of a problem for incoming requests but becomes an issue for outgoing re-written links. e.g., if you have two settings for outgoing mapping i.e map1 for devwaf.test.com and map2 foram-am-dev.test.com both resolving to the content path /content/project/content then regardless of which domain the request comes from, the outgoing short URL will be of the first setting Sling will match for that content path, in this case map1 (whichever is first match. It can be anyone).

 

Please try redirect/mapping using dispatcher or webserver redirect it will help you achieve the use case.

 

Thanks!