Forum Moderators: phranque

Message Too Old, No Replies

Using .htaccess to limit subdirectory and parent directory access

.htaccess

         

bill2

9:37 pm on Feb 19, 2007 (gmt 0)

10+ Year Member



I am having trouble getting .htaccess to allow access to selected parts of my web site. Here's the set-up

/public_html -- this is protected with "jim" and "jimpassword"
/public_html/special_files -- protect with another UserID
[Say "bob" and "bobpassword"

Each directory has a .htaccess file in it.

Here's the problem. I want certain people to access /public_html/special_files, but not /public_html.

Here's what happens: The password "bob" and "bobpassword" allows access to /public_html/special_files, but it also asked for the password to /public_html. If you just ignore it everything works fine, but I'd rather it didn't ask for the parent directory password at all.

How should I set this up?

coopster

8:01 pm on Feb 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, bill2.

Have you considered different password files or perhaps different realms?