You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Jason M. Kuhlman" <jk...@oglecounty.org> on 2003/10/01 23:00:07 UTC
[users@httpd] Authentication Redirect
I want to be able to redirect users to their 'area' of our website by which
group they are assigned to in dbm authentication file. How do I do this?
Jason M. Kuhlman
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Authentication Redirect
Posted by Cody Harris <hc...@ns.sympatico.ca>.
On Wed, 1 Oct 2003 17:03:57 -0500,
Someone named "Jason M. Kuhlman" <jk...@oglecounty.org> wrote:
> Can this be done then by user?
Yes.
(this is instuction on how to make this in theroy with perl)
Create a file. lets say called foo.txt.
In the file:
[group]
user
user2
user3
[group2]
user3
user4
Check the remote user for a user (duh).
Get the group that has access. (auth_group.txt)
/foo/foo/index.pl|group
/foo/group1/index.pl|group
/foo/group2/index.pl|group2
Ok, lets say user2 is accessing /foo/foo/index.pl:
Need group: "group", is user2 in "group"? YES. Continue executing.
If it doesn't match up, run some sub that halts the script and prints output.
If you are fancy (and a lot of people are), you could make some sort of include file and just write one central file and have like:
somesub ("user","address");
And that's my idea. Good? Maybe. Crap? Also maybe.
>
> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Wednesday, October 01, 2003 4:49 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Authentication Redirect
>
>
>
> On Wed, 1 Oct 2003, Jason M. Kuhlman wrote:
>
> > I want to be able to redirect users to their 'area' of our website by
> > which group they are assigned to in dbm authentication file. How do I
> > do this?
>
> I don't believe this is currently possible, because there is no REMOTE_GROUP
> variable filled by apache. (And it is no trivial to create one, because one
> user could be in more than one group.)
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info. To
> unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
+------------------+-----------------------------+
| Cody Harris | Signed with GnuPG signature |
| KeyID: 610031E2A | vectec.net/~cody/key.asc |
+------------------------------------------------+
RE: [users@httpd] Authentication Redirect
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 1 Oct 2003, Jason M. Kuhlman wrote:
> Can this be done then by user?
> > I want to be able to redirect users to their 'area' of our website by
> > which group they are assigned to in dbm authentication file. How do I
> > do this?
Yes. One way is with mod_rewrite. For example:
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule /protected/(.*) /protected/%1/$1
which will redirect access by the user "jason" from /protected/file to
/protected/jason/file.
See the mod_rewrite documentation for much more details.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Authentication Redirect
Posted by "Jason M. Kuhlman" <jk...@oglecounty.org>.
Can this be done then by user?
-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Wednesday, October 01, 2003 4:49 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Authentication Redirect
On Wed, 1 Oct 2003, Jason M. Kuhlman wrote:
> I want to be able to redirect users to their 'area' of our website by
> which group they are assigned to in dbm authentication file. How do I
> do this?
I don't believe this is currently possible, because there is no REMOTE_GROUP
variable filled by apache. (And it is no trivial to create one, because one
user could be in more than one group.)
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info. To
unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Authentication Redirect
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 1 Oct 2003, Jason M. Kuhlman wrote:
> I want to be able to redirect users to their 'area' of our website by which
> group they are assigned to in dbm authentication file. How do I do this?
I don't believe this is currently possible, because there is no
REMOTE_GROUP variable filled by apache. (And it is no trivial to
create one, because one user could be in more than one group.)
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org