Forum Moderators: open

Message Too Old, No Replies

index.htm in all folders?

         

Dexie

3:51 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



Some people say that you should always have an index.htm file in your folders - in any folder that you have including your images folder - that way people can't see your files - anyone know if this is a good idea please? and why or why not.

Dexie.

bumpaw

9:09 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



Try:
[2]Options -Indexes[/2]

in your .htaccess. It does the same if you have Apache server.

Dexie

8:15 am on Dec 20, 2005 (gmt 0)

10+ Year Member



I am on Apache, so thats good news, but how would that code look exactly please?

encyclo

4:51 pm on Dec 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code is exactly as bumpaw noted in your root-level .htaccess file:

Options -Indexes

This disallows the generation of an index file with a list of everything in the directory when there is no index.htm file.

Dexie

5:04 pm on Dec 20, 2005 (gmt 0)

10+ Year Member



Aah, I see - many thanks, I wasn't aware that was the exact code.

I have index.php's in some of the folders - would that still be ok?

bumpaw

5:37 am on Dec 21, 2005 (gmt 0)

10+ Year Member



index.php or index.html won't matter at all if you have them. You just won't need them to block indexes from showing.

Dexie

7:56 am on Dec 21, 2005 (gmt 0)

10+ Year Member



Many thanks - the helps been much appreciated.

Gusgsm

10:25 am on Dec 21, 2005 (gmt 0)

10+ Year Member



Please, bear a side question about this:

If I were not to allow indexing of folders and I wanted as well sending visitors who made that to a given page (The Main page, let's say), what would be the best? Perhaps including an index.html with just a redirect in every folder? Making an special 403 page? And, if so (or any other approach) what would be the consequences (SEO and the like) of that measure?

Thanks and happy Xmas, by the way :)

topsites

7:12 am on Dec 22, 2005 (gmt 0)



I do not understand this problem, I have never experienced anything of the sort, my .htaccess contains this:

Options +SymlinksIfOwnerMatch

Dexie

8:26 am on Dec 22, 2005 (gmt 0)

10+ Year Member



I've not come across that one before - what does Options +SymlinksIfOwnerMatch do please?

anthrt

12:38 pm on Dec 24, 2005 (gmt 0)

10+ Year Member



you could also chmod to 0711.