I\'m trying to get the following effect (using this local file http://localhost/[company_name]/[project_name]/.htaccess
):
http://localhost/[comp
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
Please add below lines top of .htaccess file
RewriteEngine on
#Add Trailing slash for end of the URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R]
Please use this format in .htaccess,
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]