Expand my Community achievements bar.

Introducing Adobe LLM Optimizer: Own your brand’s presence in AI-Powered search and discovery
SOLVED

ETC Mapping for two domains with same content

Avatar

Community Advisor

Hi All

       Can we do etc mapping for the same content to point to two different domains. ?

     Let's say I have  http://abc.com and http://xyz.abc.com ; I want to serve the same content(/content/a/b/c) using both the domains . Is it really feasible. We tried and are seeing some issues over it. Only one of them is getting resolved

Thanks

Veena

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi Veena,

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 www.abc.com and map2 for www.xyz.abc.com both resolving to the content path /content/a/b/c  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.

Please try redirect/mapping using dispatcher or webserver redirect.

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

Hi Veena,

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 www.abc.com and map2 for www.xyz.abc.com both resolving to the content path /content/a/b/c  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.

Please try redirect/mapping using dispatcher or webserver redirect.

Avatar

Community Advisor

Thank you !!

Avatar

Level 1

digitalect-expert

When  you said E.g. if you have two settings for outgoing mapping  i.e  map1 for www.abc.com and map2 for www.xyz.abc.com both resolving to the content path /content/a/b/c  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.

How do Sling take one mapping to be first and the other as second?

Is it purely based on the order in which "sling:mapping" type nodes  are listed under a  domain?

Avatar

Level 2

Does someone have answer for the order of settings sling picks for same content path?