Skip to content

Instantly share code, notes, and snippets.

@bogdandynamic
Created October 11, 2016 21:25
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 bogdandynamic/fb77f551982d658d7931a0d2f64cc960 to your computer and use it in GitHub Desktop.
Save bogdandynamic/fb77f551982d658d7931a0d2f64cc960 to your computer and use it in GitHub Desktop.
Nginx rewrite (remove / from the end of the url)
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment