(Table of contents & other stuff:  )

Remove double trailing slashes with .htaccess

I noticed that some referers would sometimes add an extra trailing slash to a URL.

This little .htaccess regex removes that, so it keeps your analytics clean. It basically says: "check the URL that is requested. If a double slash is found, replace it with a single slash." Easy peasy.

RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
→ Call to action ←

Want more?

Then let's close the virtual gap between us by one step.