Forum Moderators: phranque

Message Too Old, No Replies

automate HTTP Authentication using PHP

         

asifmulla

11:18 am on Apr 23, 2009 (gmt 0)

10+ Year Member



Hi,

I have protected directory say "protected" holding static html, files etc. etc. stuff under root directory.Protected directory have an authentication using htaccess. So if somebody directly access this protected folder then it asks for credentials.

Suppose I have login script written outside the protected folder. If I am authenticating using login script then is it possible to set server variables with valid login credentials so that if i am accessing protected folder then automatically it will allow to access protected data without htaccess authentication?

g1smd

11:21 am on Apr 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't believe so, unless your system is adding the new user data to the .htpasswd file there.

asifmulla

11:34 am on Apr 23, 2009 (gmt 0)

10+ Year Member



Yah my .htpasswd file is outside of protected directory and i am utilizing this .htpasswd in login script outside of protected area.

asifmulla

11:37 am on Apr 23, 2009 (gmt 0)

10+ Year Member



My Folder structure is as follows:
root
-login.php
-.htpasswd
+
--Protected
---HTML