Highlighted

Shortening of URL using etc/map | AEM Community Blog Seeding

kautuk_sahni

Community Manager

26-08-2020

BlogImage.jpg

Shortening of URL using etc/map by AEM Queries & Solutions - Nikhil Kumar

Abstract

As most of the time in our project implementation we somehow end up shortening the URL, So that the whole link or the path is not publicly available and also shorten URL looks pretty decent.

Lets start with the step by step setup of our shorten URL internal redirect URLs.

First of all we get only http folder inside /etc/map. So if we make any changes will only work in our local instances as most of the time our higher environments are https.

So, just verify your higher environments and make the changes.

1. Create a https (sling:Folder) under /etc/map, just parallel to the http.
2. Now create a node(sling:Mapping) under /etc/map/https.
3. We need to play around two properties now i.e. sling:Match and sling:InternalRedirect

sling:match : This is the string pattern that we will match with the requested URI.
sling:internalRedirect : This is the string pattern where we want to target or redirect the requested URI.

Below is a example where I am loading a page without .html and removing /content/mycompany

Once you publish this configuration then we can see the changes getting reflecting in publish instance.

Try using https.publish if you are setting up this etc mapping for the publish URLs.

Read Full Blog

Shortening of URL using etc/map

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager