Forum Moderators: phranque

Message Too Old, No Replies

Require authentication in root directory only

<Location> / <Directory>?

         

booyabazooka

7:45 pm on Jun 9, 2004 (gmt 0)

10+ Year Member



My personal server consists of a bunch of directories with downloads I can give people links to; but I would like to password protect the root directory so only I can view the index list of every directory.

It's easy to find instructions for requiring authentication for specific subdirectories; how can I just restrict the root diretory and allow open access to all of the subdirectories?

jdMorgan

5:32 am on Jun 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Man, I hate authentication problems... But no-one else seems to have answered.

You could try putting a 'satisfy any' and an 'Allow from all' in the subdirectories you want to keep open -- that's my best guess.

Jim

booyabazooka

9:52 pm on Jun 12, 2004 (gmt 0)

10+ Year Member



Well, how do you apply ANYTHING to a root directory and leave all subdirectories untouched? Is there just no easy solution?

lemat

5:15 pm on Jun 14, 2004 (gmt 0)

10+ Year Member



I belive the quick solutions are the best.

put .htaccess in root directory allowing you and denying everyone else,
and put in each subdirectories .htaccess allowing all users to get contents.

or try:

<Directory /your root>
some access for you here
</Directory>

<Directory /your root/*/>
allow all users here
</Directory>

maybe the * sign will do the trick.