I have a site using mod_rewrite to make pretty URLs ... everywhere I read the removing the trailing slash is good for SEO and therefore I went with the rule:
RewriteRule ^(.+)/$ /$1 [R=301,L]
I think the 301 redirect might impact performance but that's not my question...
The thing is that removing the trailing slash is causing me a loop when I try to access the index.php of a EXISTING subdirectory like so: http://mysite.com/a-real/directory/
To my understanding, mod_rewrite atempts to remove the trailing slash but in this case it wasn't suppose to.
How can I fix this? I'm betting that's a fairly simple solution however beyond my knowledge.