Use htaccess to Deny Access Directory Listing

Don’t have an index in all your directory’s? Many people create a blank index.html file in every directory to prevent directory listing. It’s ok for a small website, but imagine if you have a website that has hundred or thousand directories.

The easiest way is to write a htaccess file, include the following line in your .htaccess file to deny access to all the directory listings, if there is no index file.

Options -Indexes

  • 18 Users Found This Useful
Was this answer helpful?

Related Articles

Creating Backup File

How do I save an entire backup copy of my account? I want to save it on my local PC? You can...

Where should i put all my html files?

You should put all your files in public_html folder. Please do not delete the folders that...

Determine Your IP Address

IP : The Internet Protocol (IP) address is assigned to your computer, providing a numeric...