Directories w/o index.html file


#1

I have a couple accounts that I’m managing here. One that I’m helping with (www.beck2004.net) is behaving differently and I can’t figure out why. When I place files in a directory w/o an index.html I can ftp just fine to that directory and see the files, but I cannot browse to the files in that directory. Two examples are:

http://www.beck2004.net/Transfer

and

http://www.theOarFamily.net/Scouts

The pictures in the Scouts directory show up just fine, but those in the Transfer directory do not. The permissions seem to be the same, yet I get a Forbidden/404 error when I browse there. Any thoughts?

-Mike


#2

Can you try to SSH to your account and check files in transfer folder.? Maybe there is a .htaccess file which you don’t see in normal FTP client.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#3

What am I supposed to be looking for in the .htaccess file? I’m in my account now. A simple find shows several .htaccess files in my account. I’m not familiar with where they are supposed to be, which one controls what and what the contents should be. I’ll continue to research online. Thanks!

[khan]$ pwd
/home/punkaman1
[khan]$ find . | grep .htaccess
./logs/findmediation.com/http.964598/html/.htaccess
./logs/beck2004.net/http.1089256/html/.htaccess
./logs/beck2004.net/http.1094414/html/.htaccess
./logs/beck2004.net/http.1109951/html/.htaccess
./logs/beck2004.net/http.2234718/html/.htaccess
./logs/becksdoves.com/http.1455597/html/.htaccess
./beck2004.net/gallery/lib/tools/bin/.htaccess
./beck2004.net/gallery/lib/tools/po/.htaccess
./beck2004.net/gallery/lib/tools/stubs/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite/custom/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite/gallery/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite/gallery2/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite_no_options/custom/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite_no_options/gallery/.htaccess
./beck2004.net/gallery/modules/rewrite/test/mod_rewrite_no_options/gallery2/.htaccess
./beck2004.net/gallery/.htaccess
./beck2004.net/htaccess.txt
./htaccess.txt
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite/custom/.htaccess
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite/gallery/.htaccess
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite/gallery2/.htaccess
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite_no_options/custom/.htaccess
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite_no_options/gallery/.htaccess
./www.beck2004.net/gallery2/modules/rewrite/data/mod_rewrite_no_options/gallery2/.htaccess
./www.beck2004.net/gallery2/.htaccess
./www.beck2004.net/.htaccess

-Mike


#4

Thank you for pointing me in the right direction. While I don’t understand yet the ins and outs of the .htaccess file, it seems that a default htaccess.txt file was moved or activated into the .htaccess file, which was causing the directories without an index.html file to be non-browseable (if that’s even a word).

If you could give me some heads up as to the dangers of not having a .htaccess file, that would be appreciated. Other than limiting users from seeing the contents of directories w/o index.html files, I’m not sure if this exposes me to anything else.

Thanks again!

-Mike


#5

wow, there are so many .htaccess files.

I believe you should check this one. If you want to enable directory list, you should have Options Indexes inside htaccess file.

Here is for your reference.
http://wiki.dreamhost.com/Modifying_directory_indexes#Turning_on_directory_indexes

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here

As for this one, I’m not sure whether you can use .txt file or not. If it is not created by you, you can replace it with the one in /www.beck2004.net/.htaccess


#6

.htaccess is used by Apache web server for the configuration of a directory. If you don’t mind to use the default Apache setting, you can remove .htaccess file.
http://wiki.dreamhost.com/Htaccess

With .htaccess file, you can do a lot more. For example, you can disable directory indexes to disallow people to view the files in a folder unless they provide a valid file name.

You can also protect a folder with user authentication. For example, you can set a username and password to your site statistics folder so that only you can view it.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#7

CAREFUL HERE - those .htaccess files handle the re-write rules for various web applications in his directories - just deleting them will likely “break” things like his gallery, and possibly others.

Don’t just delete them until/unless you understand what they do, and what is needed and is not needed for your applications to work.

It’s time to get into the documentation for .htaccess, and the applications invloved, before going mucking haphazardly about! :wink:

–rlparker


#8

Yes, you are right. I mean ./beck2004.net/.htaccess file. You should not touch those in gallery folder because it serves some purpose.

As rlparker mentioned, there is no harm to have .htaccess file in a directory. As long as you know how to play with it, it will be your friend.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here