Vanity URL is not skipping Dispatcher rewrites | Community
Skip to main content
Level 2
February 25, 2023
Solved

Vanity URL is not skipping Dispatcher rewrites

  • February 25, 2023
  • 1 reply
  • 1232 views

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. 

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 shankarram2407

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.

1 reply

shankarram2407AuthorAccepted solution
Level 2
March 2, 2023

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.

Level 3
September 22, 2023

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

Level 2
September 25, 2023

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/index.html) and use the custom VanityURLServiceImpl in your code to handle the vanity solution. Please let me know if you need more information.