by indigodaddy · 4y ago · 0 comments
try_files $uri.html
Though personally I would do as the other comment said, keep it hi.html and use try_files or mod_rewrite to handle it. I mean, ask me to set up something like this and I probably would never have though of doing it the way in the article. It just seems weird to me.
Seems perhaps similar to try_files for nginx that a sibling commenter referenced?
try_files {uri}.html {uri}
Done. (You can also add a redirect if you want to enforce that ONLY the non-.html version is used.)try_files $uri.html
<FilesMatch "^[^.]+$">
ForceType text/html
</FilesMatch>
Which I don't think is that bad, compared to RewriteRule's.