For the assets references in the page, we have links as /content/dam/xx/abc.png . Is it possible not to expose the internal path of the asset (/content/dam) , so that we can have a link as /xx/abc.png in the page which is resolved to the actual path internally and displays the asset properly over dispatcher and publisher?
Sly , there is a need of not to expose the path - /etc/designs for clientlibs in the browser but should internally resolve and renders the clientlibs without the /etc/design path.
How do we achieve it and do we need to do something in dispatcher as well?
Solved! Go to Solution.
Thanks for the suggestion.
I tried using the sling rewriter and able to rewrite the links for clientlibs and dam assets.
Now the assets are being rewritten as :
But I am not able to render them as AEM is not resolving it.
I even tried providing configuration in etc/map/http by creating a node as following
/etc/map/http -> node (company) of type sling:Mapping
with properties as :
sling:internalRedirect -> /etc/designs/x/global.css
sling:match -> localhost:4502/company/$
But its not working.
My AIM is to render the scripts/designs/dam assets
http://localhost:4502/company/global.css which internally gets resolved as /etc/designs/x/global.css
http://localhost:4502/company/abc.js which internally gets resolved as /etc/designs/x/abc.js
http://localhost:4502/company/abc.png which internally gets resolved as /content/dam/x/abc.png
How can we achieve it ?
Configuring resource resolver url mapping [A] should work for dam. For etc never tried, If does not work use alias?