If you create a new directory (or folder) on your website, and do not put a "index.html" file in it, you may be surprised to find that your visitors can get a directory listing of all the files in that folder. For example, if you create a folder called "incoming", you can see everything in that directory simply by typing "http://www.example.com/incoming/" in your browser. No password or anything is needed.
This article shows you how you can configure your web server so that it does not show a directory listing by default.
Prerequisites
Your Website Must Be on an Apache Web Server
Your Web Host Must Have Enabled .htaccess Server Overrides
Steps to Preventing a Directory Listing
1. Get Your Existing .htaccess File, If Any
2. Make a Backup of the .htaccess File
3. Create or Open the .htaccess File (only with ascii editor)
4. Disable Indexing, Type "Options -Indexes "
5. Saving and Uploading the File make sure you save it as ".htaccess"
6.Test Your Site
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment