Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Apache AuthBasic, and sub-dirs?



6:18 am on Jan 6, 2009 (gmt 0)

10+ Year Member

Referring to the same document, [httpd.apache.org...] on Authentication, Authorization, and Access. It says -

"The AuthName directive sets the Realm to be used in the authentication. ........

So, for example, once a client has authenticated in the "Restricted Files" area, it will automatically retry the same password for any area on the same server that is marked with the "Restricted Files" Realm. Therefore, you can prevent a user from being prompted more than once for a password by letting multiple restricted areas share the same realm. Of course, for security reasons, the client will always need to ask again for the password whenever the hostname of the server changes."

My set up =

.htaccess, realm "restricted" --> directory C:/Docs

what about ? sub - dir c:/Docs/January

Do I need a new .htaccess file with realm "restrictied" in the sub-dir January, or does the realm extend downwards to protect the sub-dirs with the userid/password login?




9:04 pm on Jan 6, 2009 (gmt 0)

5+ Year Member

If your .htaccess file is in c:/Docs then the directives apply to all sub-directories below c:/Docs




9:39 pm on Jan 7, 2009 (gmt 0)

10+ Year Member

Thank you very much. for the answer.