Last active
December 29, 2015 04:18
-
-
Save joesavage/7613586 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
# Basic Rewrites | |
location ~ ^(.*/)index(\.html)?$ { return 301 $scheme://$host$1; } | |
location ~ ^(/.+)\.html$ { return 301 $scheme://$host$1; } | |
location ~ /$ { | |
# 'try_files' > 'index', to avoid re-write/location rules. | |
try_files $request_uri/index.html $request_uri/index.php =404; | |
} | |
try_files $uri.html $uri/ =404; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment