httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: logons and such... is this doable?
Date Wed, 10 Jul 2002 10:13:51 GMT
>From: Michiel_Lange@actuera.nl [mailto:Michiel_Lange@actuera.nl]

>I was wondering if the following is doable:
>
>with .htaccess / .htpasswd I create users and they have to log on.
>cool...
>
>Now I was wondering if (and how) it is possible to send the 
>logged in user
>to a 'private' page, or one that is intended for the group of 
>people the
>page is meant for.
>e.g. I have a page 'admins.html' and 'users.html' and 'noaccess.html'
>I want user 'smurf' to bind directly to admins.html
>and user 'booga' to users.html
>Users that have existed, but are no longer allowed to log on will be
>redirected to 'noaccess.html'
>Is such a thing possible to do? I have PHP installed, so maybe it is
>possible to do it with that...

Certainly. You are on the right track - it would have to be done with some server-sided processing
(PHP, ASP, CGI etc.). The attribute you need to catch and test is REMOTE_USER. This contains
the username that the client used to access the restricted area. In a perl CGI or ASP program,
you would access it this like:

use CGI;
my $query = new CGI;
my $username = $query->remote_user();

Not so sure about PHP, but the same thing will be possible.

Rgds,

Owen Boyle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message