deny direct access to files via url

Posted January 8, 2014 6.4k views
How do I prevent users from being able to access files in folders, like,, ... and so on, deny all direct access to directory listing. Cheers /Adam

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
Depending on what other goals you may have, there are two ways to accomplish this: (i) How To Use the .htaccess File; or (ii) Linux Permissions Basics and How to Use Umask on a VPS.
by Etel Sverdlov
This tutorial covers five common uses for the .htaccess file. These include: Mod_Rewrite, Authentication, Custom Error Pages, Mime Types, and Server Side Includes.