Stop Apache serving filetypes

Posted by ProfSmiles on Pro Webmasters See other posts from Pro Webmasters or by ProfSmiles
Published on 2012-09-29T14:14:19Z Indexed on 2012/09/29 15:52 UTC
Read the original article Hit count: 367

Filed under:
|
|
|

Preferably using .htaccess files, though .conf files are an option, is there any way to stop Apache serving certain filetypes?

For example, .db shouldn't be served for obvious reason (privacy and whatnot, etc.), so could I make them show as a 404 but still have them available for my CGI scripts?

Putting these sensitive files in a directory other than /public_HTML/ is also an option, though I like having them in the same directory as the scripts for ease of use.

Cheers

© Pro Webmasters or respective owner

Related posts about apache

Related posts about htaccess