[geeks] Apache help
Kurt Huhn
kurt at k-huhn.com
Thu Apr 11 21:32:58 CDT 2002
Bill Bradford wrote:
>
> Okay, I need to be able to do this:
>
> 1. go to http://web.server.machine
> 2. Have a login / password box pop up
> 3. login, say as "user1", with user1's password
> 4. Get redirected to http://server/users/user1 (or whatever directory tree).
>
> Thoughts on the easiest way to do this? MUST be password-protected, and
> *cannot* be normal UNIX users so I cant do /~user1.
>
> Bill
I've done similar with PHP. It's a kludge, but it can be done.
Basically you send the headers for login - if no login/password was sent
by the browser, then redirect to the directory using the username as a
path variable.
Kinda like:
start a PHP session
send HTTP headers (PHP function - easy to do)
get username/password
look to local user database to lookup user (at this time the username is
now a variable)
place the HTTP username into another variable name (not totally
necessary, but I like to do it this way)
send the 'refresh' metatag with the url having the username variable as
part of the URL
done...
At least that's my kludge. I'm convinced that tehres a better way to
do, but IANADeveloper...
--
Kurt
kurt at k-huhn.com
More information about the geeks
mailing list