Skip to content

Instantly share code, notes, and snippets.

@smycek
Created April 15, 2020 09:20
Show Gist options
  • Save smycek/7cee3cd7faeef5208769a3c9c8105993 to your computer and use it in GitHub Desktop.
Save smycek/7cee3cd7faeef5208769a3c9c8105993 to your computer and use it in GitHub Desktop.
location / {
rewrite ^(.*?)\.html(\.html)?$ $1 permanent;
try_files $uri $uri.html $uri.html.html $uri/ =404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment