Forum Moderators: phranque

Message Too Old, No Replies

Password protection for folder, not all of domain

Is this possible when moving the .htaccess file to a higher level?

         

Jeremy_H

4:09 pm on Dec 15, 2006 (gmt 0)

10+ Year Member



Hello,

I'm password protecting a folder on my server located at /protected/ .

Right now, I have a .htaccess file located in the folder that connects with a .htpasswd (located at a higher level) to protect that folder:

/protected/.htaccess

Right now my .htaccess has the following code:

-------
AuthUserFile /[location_of_password]/.htpasswd
AuthName "Login Required"
AuthType Basic
require valid-user
--------

I'm interested in moving my .htaccess file to a higher level, but I still want it to password protect just that folder and not my whole website.

Is this possible? Thanks.

equalm

6:57 pm on Dec 15, 2006 (gmt 0)

10+ Year Member




Based on this

[httpd.apache.org ]

any .htaccess file will apply to all subdirectories.

-george