Only on author instance I want to do mapping for URLs without .html. I have written the regex for sling:match. My use case is like, when a user hits URL like /content/we-retail/en is should redirect to /content/we-retail/en.html . ie, I want to append .html to whichever path the user is hitting, if it doesn't have .html and also I want to do this only for AEM author.
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Vaishnav_S ,
You can write a Rewrite rule in AEM dispatcher. Something as mentioned below.
RewriteRule ^/(.*)$ /$1.html [R=301,L]
If you want to handle it within AEM, Apache Sling Resource Resolver Factory can be used.
Please refer below article for more details.
Hi @Vaishnav_S ,
You can write a Rewrite rule in AEM dispatcher. Something as mentioned below.
RewriteRule ^/(.*)$ /$1.html [R=301,L]
If you want to handle it within AEM, Apache Sling Resource Resolver Factory can be used.
Please refer below article for more details.
You can use etc mapping to map incoming requests to proper resource. Check out this article.
https://medium.com/tech-learnings/how-to-implement-extension-less-urls-in-aem-a3136c71b232
Views
Likes
Replies
Views
Like
Replies