Skip to content

Instantly share code, notes, and snippets.

@JensVerneuer
Created August 29, 2016 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JensVerneuer/78c8a9ef1f0cd7c70a634f36beadbd71 to your computer and use it in GitHub Desktop.
Save JensVerneuer/78c8a9ef1f0cd7c70a634f36beadbd71 to your computer and use it in GitHub Desktop.
Remove/Add tailing slash nginx
# 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