Skip to main content
October 10, 2024
Solved

Html extension is not added in aem cloud

In aem 6.5 ,  <a href="${item.path}.html" > was working perfectly. But in cloud publisher environment, ${item.path}.html or ${item.path @ extension = 'html'} none of them are working. We get the whole url but the page extension .html is not adding. We have added etc/map in our codebase. How can I get html extension in the cloud environment?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
daniel-strmecki
daniel-strmeckiAccepted solution
Adobe Champion, Community Advisor, UG Leader
October 10, 2024

Hi @nusratja,

 

this should work fine. Is it happening on author or only publisher? Are you sure you don't have a rewrite rule in Dispatcher removing the .html extension?

 

Good luck,

Daniel

4 replies

daniel-strmecki
Adobe Champion, Community Advisor, UG Leader
daniel-strmeckiAdobe Champion, Community Advisor, UG LeaderAccepted solution
Adobe Champion, Community Advisor, UG Leader
October 10, 2024

Hi @nusratja,

 

this should work fine. Is it happening on author or only publisher? Are you sure you don't have a rewrite rule in Dispatcher removing the .html extension?

 

Good luck,

Daniel

Translate
Harwinder-singh
Community Advisor
Community Advisor
October 10, 2024

@nusratja Looks like you are stripping off the extension (.html in this case) using a rewrite rule either at dispatcher or at the CDN level if you are using something like an Akamai in front of AEM. You might want to check that out first.

Translate
h_kataria
Community Advisor
Community Advisor
October 10, 2024

How does your generated HTML look like then in the browser? Can you inspect and share that screenshot ?

Translate
kautuk_sahni
Adobe Employee
Adobe Employee
October 16, 2024

@nusratja Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni