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

[Question] Serving HTML file content when request omits file extension #152

Closed
mguinness opened this issue Jul 22, 2024 · 2 comments
Closed
Labels

Comments

@mguinness
Copy link

I'm looking for functionality to emulate the behavior of Cloudflare Pages described in Serving Pages​​. For example if a file named /contact.html exists, but the URL requested is /contact it would return the content instead of 404.

Looking at the documentation, the --reverse-proxy option looks promising. Would that be the best way to achieve this and what would the pattern look like? I'm hoping @mlaily can chime in since he introduced this feature in #85.

@mlaily
Copy link
Contributor

mlaily commented Jul 23, 2024

Sounds like --default-extensions:.html,.htm is what you want?

--reverse-proxy does not rewrite urls, it instead forwards requests to another http server.

@mguinness
Copy link
Author

Thank you very much! Apologies for missing that in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants