m3ng9i/ran

URL for 404 page should return status 404

Closed this issue · 3 comments

The 404 (and 401) error page should be "hidden" from sight. This means returning a 404 when someone requests the real URL. Say I run something lik this:

ran -r www/ -404=/404.html

a) A request to /nonexistent renders content of 404.html and returns a status code of 404.
b) A request to /404.html renders the same page, but with a status code of 200.

The second use case should return a status code of 404, as this file should not be addressable directly. When using nginx, I usually use a location block with the keyword internal to force a 404.

I'll fix this when I have free time, thanks.

@m3ng9i I would like to help, and contribute :)

I just updated the code.