Expand my Community achievements bar.

SOLVED

Url Shortening without Dispatcher configuration in AEM 6.5

Avatar

Level 2

Hi Everyone,

Currently, in my project, we handle URL shortening using dispatcher rules like below.

Example: www.domain.com/us/en/testpage.html -> internal redirect to /content/project/us/en/home/testpage

Now, we have a new requirement: we need to achieve this without using a dispatcher rules.

Example:

If I access www.domain.com/us/en/testpage.html or www.domain.com/testpage.html, it should resolve to the path /content/project/us/en/home/testpage

 

 

Experts, kindly suggest your solutions. Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi @jooca 

 

There is no centralized management Ui in AEM to manage vanity redirects in AEM.

 

You can check below article for vanity URL management redirects in AEM and dispatcher URL configurations

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

 

https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

Hope this helps !

 

Thanks 

View solution in original post

6 Replies

Avatar

Level 7

Hi @jooca

 

You can use sling mappings for the URL shortening in AEM with resource resolver. 

 

Below is the recent blog shared by @daniel-strmecki for the same. Check it out

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-blogs/aem-url-shortening-s...

 

Hope this helps

Avatar

Level 2

Can  you explain how vanity path URLs working for pages? I need to see the technical details, like GitHub code examples. I want to apply the same concept to DAM assets as well.

Avatar

Correct answer by
Level 7

Hi @jooca 

 

There is no centralized management Ui in AEM to manage vanity redirects in AEM.

 

You can check below article for vanity URL management redirects in AEM and dispatcher URL configurations

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

 

https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

Hope this helps !

 

Thanks 

Avatar

Level 2

Can someone explain how vanity path URLs working for pages? I need to see the technical details, like GitHub code examples. I want to apply the same concept to DAM assets as well.

Avatar

Level 7

To implement URL shortening without dispatcher rules in AEM, you can use Sling Mappings. This allows you to map custom URLs to resources. For DAM assets, you can use vanity URLs.

 

For detailed steps on vanity URL management and using Sling Mappings, you can refer to these resources:

Vanity URL Configuration in AEM- https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

Enabling Vanity URLs in AEM - https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

These guides will help you apply the same concept to DAM assets.

Avatar

Level 10

@jooca just be careful with using Sling mappings in case you need to support the same Vanity URLs on multiple domains. Reasons why are explained in the article: https://meticulous.digital/blog/f/aem-url-shortening-sling-mappings-vs-dispatcher-rewrites

Also, you said you have a requirement "We need to achieve this without using Dispatcher rules". How and why is that a requirement? Business requirements are usually "I want to have short URLs" or "I want to have SEO-optimized URLs" and then it's up to the development team to find the best implementation.

 

Good luck,

Daniel