3 ms·
> with things like nginx or Apache httpd, you won’t get this out of the box and must opt into it For anyone wondering, in Apache this can be done with MultiVie
by hunter2_ 5y ago
> with things like nginx or Apache httpd, you won’t get this out of the box and must opt into it
For anyone wondering, in Apache this can be done with MultiViews [0], which is kind of nifty, but also a can of worms.
I find it interesting that TFA says "when resource.html and resource/index.html both exist ... Everyone agrees that /resource should return content from resource.html" but it seems like [1] MultiViews works the opposite way: "if the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*" [0].
[0] https://httpd.apache.org/docs/2.4/content-negotiation.html#multiviews https://httpd.apache.org/docs/2.4/content-negotiation.html#m...
[1] I could be misinterpreting the doc. I haven't tested the actual behavior of httpd to know exactly what happens in a no-trailing-slash request of this nature.