how to prevent directory browsing?

cca

Perch
On a windows account i am running some php scripts, therefore i have set Directoy Indexes to ON & added default.asp & index.php to the indexes list for the domain.
Now if i browse to a folder that has an index.php or default.asp file
eg www. mysite.com/
the default or index file will load.
eg mysite.com/index.php

My prob is that if i browse to say www. mysite.com/img/
which has no default.asp or index.php then the page loads displaying the list of files that are in the img folder.

I donot want the list of files displayed, as i have not set an index for that folder shouldn't it display "Directory Denied" ??

How can i fix this? do i have to set an index page for every possible folder to prevent folder browsing?
 
I don't know if this is it or not but in your control panel click on domains, then click on the domain in question, then click the edit web services icon, then examine the Settings / Indexes where you have a choice of at least Enabled and Disabled and possibly Fancy. Try setting it to disabled. I am using a linux account so I am not sure if this is the spot.

Something you can quickly check though. Sorry if this is not it. Just trying to go from memory.
 
That is correct, and if you need further help feel free to contact us on support.
 
Sorry to bump up an old topic, but can someone confirm this is working correctly for Linux servers?

I've setup a wordpress install and I'm trying to prevent ppl from browsing the plugins directory. So I disabled Directory Indexes and pressed the "Apply" link.

However, directory indexes are still browse-able.

Anyone else encounter this?

ETA: Fixed it! It had something to do w/ my htaccess. Wordpress was creating something else that seemed to override the settings.

Basically just put a

Code:
Options All -Indexes

in your htaccess file.
 
Back
Top