ETC Mapping for two domains with same content | Community
Skip to main content
VeenaVikraman
Community Advisor
Community Advisor
October 12, 2017
Solved

ETC Mapping for two domains with same content

  • October 12, 2017
  • 3 replies
  • 2569 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

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.

3 replies

Accepted solution
October 12, 2017

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.

VeenaVikraman
Community Advisor
Community Advisor
November 3, 2017

Thank you !!

September 17, 2018

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?

March 22, 2024

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