I bought a domain name and am trying to figure out how to configure it responsibly. I haven't set up an index.html file yet and I've noticed that if I hit my domain, I see my file directory tree. and I can dive down to all the files within my browser. Is there a way that I can disable this?
A:
If you are using IIS.
- Right-click on your website, and choose Properties.
- Select Home Directory tab.
- Uncheck the Directory browsing.
Mehdi Golchin
2009-11-08 06:05:22
A:
You can try a few things:
- create an empty file named index.html and upload it into the public_folder
- create an .htaccess file with the following contents: Options -Indexes
- If you have some kind of cpanel for your site, look for options to disable directory browsing.
Creating the index.html file is probably the easiest and most consistent way to go.
FYI, my .htaccess info came from techiecorner.com
Frank DeRosa
2009-11-08 06:34:06