etc/map configuration during migration | Community
Skip to main content
October 10, 2021
Solved

etc/map configuration during migration

  • October 10, 2021
  • 1 reply
  • 1161 views

Hi Community, I am having one requirement with etc/map for migration. I have created one node with two properties sling:mapping and sling:internalRedirect still unable to get expected results. Could anyone please provide help on this.  Also let me know if any more details required. Thanks in advance.

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 Asutosh_Jena_

Hi @phampi 

 

Please check in Resource Resolver Factory configuration which path is configured for the resource resolver map location. 

resource.resolver.map.location="/etc/map"

org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.xml

 

Also please ensure you are using the same instance i.e. if you are checking on author which is running on 4502, the mapping also defined as 4502. Here I see it's defined at 4503.

 

Once you make sure the mapping it picked, it will start resolving and you can see the shortened URL.

 

Thanks!

1 reply

Asutosh_Jena_
Community Advisor
Community Advisor
October 10, 2021

Hi @phampi 

 

Could you please add some more information regarding the issue that you are facing?

 

etc/map normally works in the below approach:

- Create a node of type sling:mapping with any unique name, preferably the domain name.

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/content/website/something/en_us/index.html"
sling:match="www.something.com/$"/>

 

Link for reference:

https://experienceleague.adobe.com/docs/experience-manager-64/deploying/configuring/resource-mapping.html?lang=en

 

Thanks!

phampiAuthor
October 10, 2021

Hi @asutosh_jena_, thanks for the response. I am just looking for how etc/map is working internally and how it will be helpful during migration. Referring below link http://blog.magmalabs.io/2016/07/26/how-to-use-internal-redirects-in-aem.html 

The same is replicated to publish instance as well. But expected result is not coming. Please guide.

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
October 10, 2021

Hi @phampi 

 

Please check in Resource Resolver Factory configuration which path is configured for the resource resolver map location. 

resource.resolver.map.location="/etc/map"

org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.xml

 

Also please ensure you are using the same instance i.e. if you are checking on author which is running on 4502, the mapping also defined as 4502. Here I see it's defined at 4503.

 

Once you make sure the mapping it picked, it will start resolving and you can see the shortened URL.

 

Thanks!