Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static serving resolves .html extension. #186

Merged
merged 1 commit into from
Jan 13, 2021

Conversation

chr15m
Copy link
Contributor

@chr15m chr15m commented Jan 13, 2021

When serving static sites there is a general expectation that a bare URL like /mypage will automatically resolve to a .html extension like /mypage.html if the file exists. This is the norm for example on GitHub pages and Netlify, two popular static site hosting platforms. This patch adds a try_files clause to the static nginx config stanza to implement this behaviour by default when in static serving mode.

@chr15m chr15m requested a review from rcarmo January 13, 2021 00:13
@rcarmo
Copy link
Member

rcarmo commented Jan 13, 2021

Yeah, I was wondering about static hosting the other day and this makes perfect sense.

@rcarmo rcarmo merged commit 3785190 into piku:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants