As well as protecting directories .htaccess can also be used to protect individual files or types of files.
More Tutorials