Created
July 24, 2014 20:27
-
-
Save alexroper/4f6036a70c072efd19de to your computer and use it in GitHub Desktop.
Force training slash in URL with .htaccess
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
# Force training slash in URL | |
<IfModule mod_rewrite.c> | |
RewriteCond %{REQUEST_METHOD} !=POST | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)([^/])$ http://%{HTTP_HOST}/$1$2/ [L,R=301] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment