Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Utility for adding resource mapping in etc/map

Avatar

Level 3

Hi ,

I have more than 300 old URLs to map to new URLs for internal redirect.

Could you please let me know/suggest if any utility is available to do the same instead creating the sling:Mapping node manually for each redirect in /etc/map/http ?

Thanks,

Hari

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Level 10

Hi there,

Thanks for reaching out to Adobe Community.

To create the mapping that prefixes any request to http://localhost:4503/ with /content:

  1. Using CRXDE navigate to /etc/map/http.
  2. Create a new node:
    • Type sling:Mapping
      This node type is intended for such mappings, though its use is not mandatory.
    • Name localhost_any
  3. Click Save All.

Please see if the below doc for more help on this:

http://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/resource-mapping.html

Thanks!

Avatar

Correct answer by
Level 10

Write your own Link re-writer service to perform this task. See:

http://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.h...

https://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html

Using org.apache.sling.rewriter, you have a lot of flexibility. 

Avatar

Level 3

Thanks Shekhar Dhiman,

I was inquiring if we can automate this process for multiple redirects (i have 300 URLs to update mappings) instead creating node manually for each redirect.

Could you please let me know if there is any utility available or thoughts on automating ?

Thanks,

Hari