Expand my Community achievements bar.

SOLVED

etc/map configuration during migration

Avatar

Level 3

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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!

View solution in original post

4 Replies

Avatar

Community Advisor

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...

 

Thanks!

Avatar

Level 3

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.

unable to see the mapping in http://localhost:4502/system/console/jcrresolverunable to see the mapping in http://localhost:4502/system/console/jcrresolverCreated two properties hereCreated two properties here

Avatar

Correct answer by
Community Advisor

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!

Avatar

Level 3

Hi @Asutosh_Jena_ , thanks for the help, now I am able to see proper and expected results.

Some configurations were missed due to which causing error. Hence marking as answered/ correct reply.