I would like to remove all urls with trailing slashes using the .htaccess file. I have tried a couple peices of code suggested on other questions but does not work.
Any suggestions on how to do this by modifying the code below?
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.(gif|jpe?g|png|pdf)$ [NC]
RewriteRule ^(.*)$ /index.php?$1 [L]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
/blog/url_title
, would expect a list to be at/blog/
. Same for/blog/url_title/comments
, to me it does somewhat suggest a directory or a resource.