That’s the solution that worked for me …
# remove multiple slashes RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ [NC] RewriteRule . %1/%2 [R=301,L] # ... within URL-path RewriteRule ^(([^/]+/)*)/+(.*)$ http://%{HTTP_HOST}/$1$3 [R=301,L] # ... before URL-path RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} //+([^ ]*) RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L]
The post The one and only method to remove multiple/double slashes from URLs (apache, mod_rewrite) appeared first on bohuco.net.