Utility for adding resource mapping in etc/map | Community
Skip to main content
Level 2
October 16, 2015
Solved

Utility for adding resource mapping in etc/map

  • October 16, 2015
  • 3 replies
  • 1114 views

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

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 smacdonald2008

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

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

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

3 replies

WhoaShekhar
Level 10
October 16, 2015

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!

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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

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

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

Level 2
October 16, 2015

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