View directory contents?

Hi there.

Using FTP, I’ve uploaded test files to a directory on my website and can’t see them in the directory listing when I type in the URL. There’s no index.html page and I’ve tried putting in an .htaccess page with Options +Indexes as the only line, but that didn’t work either. Is there some DreamHost-specific thing that I’ve missed while searching the Wiki and this board that disallows listing of directory contents? I can download the document I’ve uploaded if I enter the full pathname.

Thanks in advance for your help.

Did you upload the files to the correct path? It will be something like /

As far as I know, ‘Options +Indexes’ is the default setting, so you shouldn’t need a .htaccess file to make this happen.

No, nothing DreamHost specific. In-fact, most queries on this subject here on the forum tend to be asking the opposite, how to disable directory listings in Apache.

Are there any other .htaccess files further up the directory tree that may be affecting the directory you are interested in?


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

Indeed the files are in the correct path - if you type in the entire URL including filename, you’re invited to download the test file (or view it, if it’s .txt or html or whatever).

I did the .htaccess thing to make certain that there wasn’t a DH-specific .htaccess file somewhere that I hadn’t seen yet. the +Indexes would have overridden anything upstream if that was the case. My site itself doesn’t have anything keeping the directory contents hidden - I used to do this on my old hosts all the time.

I guess I should put in a support request. Thanks for your input!

Strange indeed.

Since you do not have a .htaccess file active, there aren’t many things that I can think of that may be causing the problem. Some things that come to mind…

Incorrect permissions for the directory (should be 755 by default).
‘Hidden’ file-names (starting with ‘.’ character).
Browser caching previous directory contents, try clearing browser cache.


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

Thanks for your input - I’m pretty sure this is a support request. I created a new folder, put a test .txt file and a test .mp3 in it and typed the address in my browser. Up came a page that was exactly what I expected, with “index of /temp” and " Name, Last modified, Size & Description" as sort links across the top, but then there were just two horizontal rules as if the folder was empty.

Very strange.

Yes, very strange indeed.

Be sure to post back when you here from support, I would be interested to learn what the problem turns out to be.


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

On a related question I’ve been wondering about…If I wanted to ‘hide’ the directory contents of the root directory (or any directory for that matter) Could I simply put a dummy index.html file in the main directory. Just says ‘hi’ or something. Then it would just say ‘hi’ instead of listing all the files. Would there be any other way to list the contents of that directory or is that now hidden?

Yes, that would work. You could also add the following line to the .htaccess file in that directory, or create the .htaccess file if one does not already exist.

Options -Indexes

This method has the advantage that it will affect the directory in which the .htaccess is placed and all sub-directories, unless over-ridden by another .htaccess file in those sub-directories.


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)