Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Vanity URL is not skipping Dispatcher rewrites

Avatar

Level 2

Trying to implement Vanity URLs in my project. Tried both the dispatcher recommended vanity url approach and ACS commons vanity error mapping approach as well. 

 

For dispatcher recommended vanity url approach - The vanity URL configs in dispatcher is not getting picked up properly since the rewrite configs are executed after that and the rewrite rules are not getting skipped

 

For ACS commons vanity error mapping approach - Since the URL is passing to publisher with the content tree prefix as per the rewrite rules in dispatcher, the VanityURLServiceImpl is failing to dispatch to the URL eventhough the resource resolution is correct as per JCR resolver. 

 

Is there a way for the vanity URL being skipped as part of the rewrite rules in dispatcher. Have been trying to resolve this for the past 2 to 3 days but no luck. Please help me if I am missing something regarding the same. 

1 Accepted Solution

Avatar

Correct answer by
Level 2

This is resolved by creating a custom implementation of VanityURLServiceImpl from ACS Commons to extract the vanity path after the resourceResolver.map() is executed. This resolved the OOTB logic issue of ACS commons and the original vanity path issue as well.

 

The OOTB Dispatcher configuration based vanity solution didnt work in the end.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 2

This is resolved by creating a custom implementation of VanityURLServiceImpl from ACS Commons to extract the vanity path after the resourceResolver.map() is executed. This resolved the OOTB logic issue of ACS commons and the original vanity path issue as well.

 

The OOTB Dispatcher configuration based vanity solution didnt work in the end.

Avatar

Level 3

@shankarram2407  We are also facing exactly same issue. Could you please share your solution? Thanks in advance.

Avatar

Level 2

This needs to be via the error handler based solution proposed by AEM ACS commons (https://adobe-consulting-services.github.io/acs-aem-commons/features/vanity-path-rewrite-mapper/inde...) and use the custom VanityURLServiceImpl in your code to handle the vanity solution. Please let me know if you need more information.