How to make ADSF/Puma serve HTML files without the .html extension

145 Views Asked by At

I am building a static site without the help of Jekyll or any other known static site builder. When deploying such site to a static site host like GitHub Pages or Netlify, these servers know to load software.html when I am accessing mydomain.com/software (without the .html extension).

Is there a way for me to reproduce this behavior when running a local, Ruby-based web server such as Puma? More specifically, I am using Ruby's adsf wrapper to launch a Puma server to serve my site locally for development.

My guess is that this should be possible by some rack middleware or rack configuration, I am just unable to identify the proper Google search for it.

I should probably mention that I am not interested in the directory/index.html approach, since all web servers I have seen add a trailing slash to the URL in these cases.

1

There are 1 best solutions below

1
On BEST ANSWER