Disable Viewing Open Directories
If someone is out to clone your website or steal all of your images, nothing is easier for them than if you leave your directories open. Not just because of this, but it’s also a security concern. This is when you don’t include an “index” or “home” page in a directory and all the files within that directory can be viewed in a browser.
To disable viewing open directories, insert the following code in your htaccess file:
With the above code in place, the visitor would receive a “Forbidden” error message.
You can reverse this command if you specifically want to allow directory browsing:
If you want to allow directory browsing but only want to hide certain filetypes from being viewed, you can use this:
You can list each filetype you don’t want to be viewed in an open directory with each filetype seperated with a “*”.
Popularity: 7% [?]



Free Online Tutorials



