Hi,
I was wondering if someone could point me in the right direction on how to correct an issues im having when I force trailing slashes.
Im quite new to Htacess - so apologies if it’s something obvious I have missed out.
I need to force a trailing slash after all folders - which seems to work no problem, but i don’t want to have the trailing slash after an actual page with an extension (example.php)
The code im using works fine at root level - but any pages deeper down end up being returned with a trailing slash.
For example www.example.com/folder/folder/page.php/
Where as I need to it to return www.example.com/folder/folder/page.php
I couldn’t seem to find the exact same problem while searching the forums so any headers would be great.
The current code im using is:
#RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !index.php
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ^(.*)$ http://www.example.com/$1/ [L,R=301]
Many thanks in advance for any advice.
Jay