Skip to content

Instantly share code, notes, and snippets.

@rlandas
Created July 10, 2015 00:23
Show Gist options
  • Select an option

  • Save rlandas/9773a96c109ed5bc3532 to your computer and use it in GitHub Desktop.

Select an option

Save rlandas/9773a96c109ed5bc3532 to your computer and use it in GitHub Desktop.
APACHE Remove multiple slashes anywhere in the URL
# remove multiple slashes anywhere in url
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
@drikpanchang
Copy link

This soution fails if URL has odd number of slashes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment