Skip to content

Instantly share code, notes, and snippets.

@iso100
Created May 4, 2013 18:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iso100/5518252 to your computer and use it in GitHub Desktop.
Save iso100/5518252 to your computer and use it in GitHub Desktop.
Remove trailing slash from URLs
# Remove Trailing Slash
# ------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)$
RewriteRule ^(.+)/$ http://www.yourdomain.com/$1 [R=301,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment