I have managed to successfully remove the .php extension to my files, but am having problems adding a trailing slash to my pages. Sorry if this has been covered before, have searched everywhere but can't find anything that will work.
Any help would be much appreciated, my ht.access currently looks like this:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index
RewriteRule ^(.*)index$ http://www.mywebsite.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^mywebsite.co.uk [NC]
RewriteRule (.*) http://www.mywebsite.co.uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+\.)+php?\ HTTP
RewriteRule (.+)\.php?$ http://www.mywebsite.co.uk/$1 [R=301,L]
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME}\.php -f
RewriteRule ^(.*)$ $1.php
The first part is just to redirect the home page to one version. The indented part is what I used to remove the .php from the filenames. Just need to add a trailing slash to files that don't already have one.