How to make web directories non-browsable?


#1

Hi there …

Was just poking around at the web hosting portion of dreamhost and can’t figure out how to set my domain to be non-browsable on the directories. Sure, I could put an index.html file in every directory, but that gets to be annoying. How do I change that?


#2

Create a text file with a filename of .htaccess containing the following text:Options -IndexesSave it in your web root directory (where your home page goes) and it will turn off directory browsing.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#3

Ah, never knew you could put Options directives in the .htaccess. I had my old httpd.conf w/ -Indexes, but obviously didn’t have access to that here.


#4

Hmm…This doesn’t work for me, I’ve put the Options -Indexes in .htacess in the root of the domain. But it doesn’t block indexing of any folder at all…

Any Idea’s?

Seditio Forge - CMS User ran site
FFXI Mod Communtiy


#5

Try spelling it “.htaccess”. :wink:

–rlparker


#6

well yes, I just spelled it wrong in here typing it. I use .htaccess for other things (mod rewrites, and increase upload)

Bleh and well went back checked them now. And it works fine. (didn’t change anything cause I left it in) Guess was seomthing wrong with server or soemthing then when I orginally did it.

Seditio Forge - CMS User ran site
FFXI Mod Communtiy


#7

Hey sometimes it does seem like voodoo, eh? I’m glad you have it working! :slight_smile:

–rlparker