Adobe Aem - Rewrite Static Asset Urls | Community
Skip to main content
robertol6836527
Level 4
December 17, 2024
Solved

Adobe Aem - Rewrite Static Asset Urls

  • December 17, 2024
  • 5 replies
  • 1021 views

Hello,


I am currently working with Adobe AEM 6.5 in an on-premises environment and would like to find a way to modify the HTML of web pages to automatically replace the img:src, link:href, and script:src attributes. Specifically:

 

 

Could you please guide me on the best approach to implement this solution ?

 

Thank you in advance for your support.

Best answer by Shashi_Mulugu

@robertol6836527 Wwelcome to AEM Experience League community. you reached perfect place to get your AEM queried answered.

 

We have exact solution already implemented by our fellow Adobe Consulting experts under ACS commons. All it takes is to install ACS commons in your instance which is compatible with your AEM version and do the configuration.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/utils-and-apis/static-reference-rewriter/index.html

5 replies

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 17, 2024

Hi @robertol6836527,

can you explain the purpose of this change? Why would you use absolute links? Relative links will work well in all AEM instances, with and without CDN.

 

Daniel

konstantyn_diachenko
Community Advisor
Community Advisor
December 18, 2024
Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.
narendiran_ravi
Level 6
December 18, 2024

Hi, As @konstantyn_diachenko mentioned link transformer makes the page generation very slow . I would recommend to use proxy at CDN level when any request starts with /etc.clientlibs or /content/dam to map to cdn domain instead of sending request to dispatcher.

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
December 18, 2024

@robertol6836527 Wwelcome to AEM Experience League community. you reached perfect place to get your AEM queried answered.

 

We have exact solution already implemented by our fellow Adobe Consulting experts under ACS commons. All it takes is to install ACS commons in your instance which is compatible with your AEM version and do the configuration.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/utils-and-apis/static-reference-rewriter/index.html

Tethich
Community Advisor
Community Advisor
December 18, 2024