Trying to add ending slash to all urls. Here is the code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !.html$
RewriteCond %{REQUEST_URI} !.xml$
RewriteRule ^(.*[^/])$ $1/ [R=301,L]
It works BUT. When visiting http://www.example.com// you get a clone of index page. This is not good for seo. However http://www.example.com/articles// redirects fine to http://www.example.com/articles/ How to deal with double slash in index? Need help!