PDA

View Full Version : Preventing directory listing


tartuffo
02-11-2001, 03:16 PM
First, I notice that if I do not have an "index.html" file in a directory in my www tree, if I give the URL of that directory in my browser, the web server is returning its directory listing (with "Index of" at the top of the page).[nbsp][nbsp]If I do have an index.html, will someone still be able to request the directory listing?

And if so, is it possible to configure my FQ account so that it will not serve up directory listings from my www directory?

Thanks,

Nick

PaulKroll
02-11-2001, 03:30 PM
If you have an index.html, they can't get a directory listing. There are apache config settings that can change/turn off apache's auto-directory feature. Check out http://httpd.apache.org/docs/mod/core.html#options which seems to imply that:

Options -Indexes

in your .htaccess file(s) would do the trick.

Note that if you put config info into .htaccess that it doesn't understand, you're likely to bring your site to a screeching halt, so if this is all alien-sounding to you, put the index.html files in the trouble-spots for now and do some reading until you're comfortable with altering the .htaccess file.