Created
August 29, 2016 09:52
-
-
Save JensVerneuer/78c8a9ef1f0cd7c70a634f36beadbd71 to your computer and use it in GitHub Desktop.
Remove/Add tailing slash nginx
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
# add trailing slash | |
rewrite ^(.*[^/])$ $1/ permanent; | |
# Remove trailing slash | |
rewrite ^/(.*)/$ /$1 permanent; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment