Created
May 24, 2012 20:30
-
-
Save gcarrion-gfrmedia/2784020 to your computer and use it in GitHub Desktop.
Add a trailing slash to requested 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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !example.php | |
RewriteCond %{REQUEST_URI} !(.*)/$ | |
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301] | |
# Source: http://enarion.net/web/htaccess/trailing-slash/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment