Created
May 4, 2013 18:04
-
-
Save iso100/5518252 to your computer and use it in GitHub Desktop.
Remove trailing slash from URLs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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