Hi Everyone,
how to remove the ".html" extension from all links within the abc.com top navigation.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Kanthsri , you can use resource resolver to map the URLs without html extension.
Or if you want to remove the .html extension for particular component you can use the snippet like below in your component html.
${'path/page.html' @ extension}
<!-- outputs: path/page -->
Hi @Kanthsri , you can use resource resolver to map the URLs without html extension.
Or if you want to remove the .html extension for particular component you can use the snippet like below in your component html.
${'path/page.html' @ extension}
<!-- outputs: path/page -->
@Kanthsri hope you are looking for a dispatcher rule to remove .html from the url. Try below code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)\.html$ /$1 [NC,L]
Please have a look at the discussion on https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/after-sling-mappings-confi...
Prefer using Sling mappings to remove .html extensions/URL shortening from HTML content
Views
Likes
Replies