Html extension is not added in aem cloud | Community
Skip to main content
New Participant
October 10, 2024
Solved

Html extension is not added in aem cloud

  • October 10, 2024
  • 4 replies
  • 836 views

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.
Best answer by daniel-strmecki

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

kautuk_sahni
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!

Kautuk Sahni
h_kataria
New Participant
October 10, 2024

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

Harwinder-singh
New Participant
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.

daniel-strmecki
daniel-strmeckiAccepted solution
New Participant
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