DirectorySlash Off
# Allow mod_rewrite to function when there is no trailing slash
RewriteOptions AllowNoSlash
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !(.*)/$
# RewriteRule ^(.*)$ $1/ [L,R=301]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]