mor rewrite slash to non slash
Hi,
My site is a PHP dadabase driven site where all files should end without the /
i.e. mydomain.co.uk/insurance/cheap
However mydomain.co.uk/insurance/cheap/ also works and so duplicate content could be an issue. I would like the trailing slash to be diverted to the non trailing slash, or if it is better, the other way round.
I understand what the code will do, but I am not a coder and just get confused when it is all explained to me.
My solution has been to read the posts and copy and paste as many mod rewite code into my .htaccess file until I find one that works and have done this for non www to www and index to / issues which work ok.
But even looking at past posts I cant find a version that works.
So i am posting my .htaccess (minus real url) to see if the existing version is affecting any more additions or if someone can give me another version of the rewrite that may work. can you help?
here is my current .htacess. What can I add to send / to non /
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(mysite\.co(\.uk¦m)¦www\.mysite\.com) [NC]
RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index.php$ http://www.mysite.co.uk/$1 [R=301,L]
# Is it not a file
RewriteCond %{REQUEST_FILENAME}!-f
# Is it not a directory
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.+)$ manager.php?url=$1 [L]
What can i add to this?
Thanks
Mark
|