Configure unknown filetypes to give 404?

PSS

Well-Known Member
#1
I noticed one Linux text editor left behind altered copies of the edited file and this idiocy made those .php files viewable online as text. Luckily the few files affected were no critical for site security. This behaviour is very dangerous (php source code revealed).

How do I set a "catchall" rule for all extensions that are not defined, so that they give 404 when retrieved?

Reference talk:
https://security.stackexchange.com/...the-tilde-mean-at-the-end-of-a-file-extension
 
Top