Forum Moderators: open

Message Too Old, No Replies

How to: Simple password that redirects to folder

         

kapow

2:13 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, I don't know the right terms to use explaining this. I want a simple password facility AND have it redirect to the folder for that username.

I have 2 folders with password access (say A and B).
Each folder uses .htaccess for basic password setup
e.g. in my .htaccess file I have something like: AuthType Basic, require user B

I want the login on index.html (above A and B) AND for it to forward logins to the right folder (A or B) AND to send the username and password to the .htaccess thing. (Is it possible to 'send' a username and password to the .htaccess thing?).

encyclo

12:56 am on Aug 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately this goes a bit beyond the ounds of the traditional Apache basic authentication controlled by a .htaccess file. In this case, you are going to have to use some server-side scripting in order to manage your users and appropriate redirects. Which languages do you have available? PHP, ASP...?

If you have PHP there is a good introduction to a simple password system in this thread [webmasterworld.com].

kapow

1:25 pm on Aug 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Encyclo

Is there a way to pass a Username and Password to the 'traditional Apache basic authentication controlled by a .htaccess file'
I only need to pass it once.

Otherwise I guess I have to have a script on every page in the folders.