Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2014 21:57
Show Gist options
  • Save anonymous/7eb637f54e2eb5a485e2 to your computer and use it in GitHub Desktop.
Save anonymous/7eb637f54e2eb5a485e2 to your computer and use it in GitHub Desktop.
Remove trailing slashes
# Remove Trailing Slash
# ------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)$
RewriteRule ^(.+)/$ http://www.sitename.ext/$1 [R=301,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment