×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

Web Security example - How to disable the listing of a directory content using a .htaccess file?


Web Security - How to disable the listing of a directory content using a .htaccess file?

To disable the directories listing on your website is an important step if you would like to make your website more secure and less vulnerable to hacker attacks. Allowing the users to list the content of your folders and files in them, could  help malicious users to obtain important information about your server side script and other files and use them after to attach your website.

To disable the folders content browsing on an Apache server, you could simply use a .htaccess file and insert the following line in it:

Options -Indexes

If you already have a .htaccess file on your website with some other content in it, you could insert this line at the top of the file (to avoid possible conflicts with other .htaccess directives).

Category: Web Security

 
<< Go back