htaccess remove double slash from URL

28.Jun.2010

In order to remove double or multiple slash from your URL using only .htaccess you can use following code:

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