Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

ACS Commons StaticReferenceRewriteTransformerFactory.cfg.json

Avatar

Level 2

 

I have an issue with matchingPatterns not working. I am trying to rewrite pdf links <a href="/content/dam/whatever.pdf"> links 
into <a href="http://satic.dev.mysite.com/content/dam/whatever.pdf">. The config file below doesn't work for matchingPatterns, but everything else works.
I tried a ton of different things and can't seem to get that attribute to do anything. I tried acs commons 5.3.4, 5.7.0, 6.1.0. Any clues?


com.adobe.acs.commons.rewriter.impl.StaticReferenceRewriteTransformerFactory.cfg.json


{
"host.pattern":[
"static.dev.mysite.com"
],
"attributes":[
"img:src",
"link:href",
"script:src"
],
"matchingPatterns":[
"a:href;(\/content\/(.*?)\\.pdf)"
],
"host.scheme":"http",
"prefixes":[
"/etc.clientlibs",
"/etc",
"/libs",
"/content"
],
"pipeline.type":"mysite-static-refs"
}

 

3 Replies

Avatar

Community Advisor

Hello @jimmychaucap 

 

Are you using AEM 6.5 or AEM Cloud?


Aanchal Sikka

Avatar

Administrator

@aanchal-sikka, Can you share your thoughts on this? 



Kautuk Sahni