how to return redirects instead of content on path normalized requests?
13:59 19 Jun 2026

I just noticed nginx normalize file system requests (I only see those requests from bots, since browsers do that normalization themselves BEFORE sending the request)

For example:

https://example.com/./index.html causes nginx to return the file at /index.html with a "200 OK" response.

How can I stop this feature? i rather have a 404 or a 3xx redirect. But the 404 is even preferable.

nginx