Created
July 30, 2015 18:43
-
-
Save lukebussey/92d8531f7a19f3622e1b to your computer and use it in GitHub Desktop.
This file contains 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
# ---------------------------------------------------------------------- | |
# | Trailing Slash Fix | | |
# ---------------------------------------------------------------------- | |
# Fixes the issue where mod_dir would issue a full redirect with the | |
# incorrect hostname when missing a trailing slash on a directory. | |
DirectorySlash Off | |
<IfModule mod_rewrite.c> | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^(.*[^/])$ /$1/ [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment