Skip to content

Instantly share code, notes, and snippets.

@micahasmith
Created June 10, 2012 19:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save micahasmith/2907093 to your computer and use it in GitHub Desktop.
nginx rewrite configuration
# here i'm telling the server to rewrite all requests
# for that contain a html extension-- remove the html
rewrite (.*)\.html $1 permanent;
# here i'm telling the server to try finding the file by appending
# the .html on to it
# important since the files all have extensions
try_files $uri.html $uri/ /index.html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment