Hi All,
Extra "/" is adding in the end of the page like : https://domainname/content/abc/dashboard.html/ and this is cached on dispatcher level because dispatcher is treating dashboard.html page as a directory.
On dispatcher side we can see this url used by some user "dashboard.html/content/dam/abc/us/project-folder/image/common/icon/favicon"
How can we restrict it, so that dispatcher will not treat this page as directory and "/" will not append in the url. Please suggest.
We are using AEM6.4 right now.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @sunily21159739,
The same problem is being discussed in here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/remove-trailing-slash-from...
<IfModule disp_apache2.c>
DirectorySlash Off
SetHandler dispatcher-handler
</IfModule>
One way i can think of is to add a rewrite that will remove the trailing slash from your URL's . You can use the below snippet and add the same in the apache rewrites.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.*)/$ $1 [L,R=301]
Remove R=301 if you don't want to show the redirect
You can also test the same in the below url
https://technicalseo.com/tools/htaccess/
Hope it helps!
Hi @sunily21159739,
The same problem is being discussed in here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/remove-trailing-slash-from...
<IfModule disp_apache2.c>
DirectorySlash Off
SetHandler dispatcher-handler
</IfModule>
@sunily21159739 , you need to Set DirectorySlash directive to off in Apache's mod_dir module.
Refer to the below link :
Views
Likes
Replies
Views
Likes
Replies