[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Redirecting to a index page depending on group membership on Apache 1.3



----- Original Message ----- 
From: "Chris J" <cej [at] nightwolf.org.uk>
To: <shef-lug [at] list.sheflug.org.uk>
Sent: Tuesday, August 26, 2003 8:11 PM
Subject: Re: [Sheflug] Redirecting to a index page depending on group
membership on Apache 1.3


>
> And Lo! The Great Prophet "Rob Keeling" uttered these words of wisdom:
> >
> > As far as I know apache runs php scripts etc as the apache user, so this
> > wouldn't`t work. It looks like I need to be using
> > apache authentication directives but what should I use?
> >
>
> There is a possible solution using pure Apache config, however that will
> require you to have a chunk of Apache configuration that lists the
> usernames, a la:
>
> RewriteCond %{REMOTE_USER} ^bob$ [OR]
> RewriteCond %{REMOTE_USER} ^fred$ [OR]
> RewriteCond %{REMOTE_USER} ^sandra$
> RewriteRule ^/$ /staff-only/index.html

Now there`s a thought, 95% of our student usernames are prefixed 0-9 so if I
could redirect
on if the first char of the user name is numeric, that would mean only a
very few users would even
see the links to the staff pages, and standard acls would stop them being
used.

would something like

RewriteCond %{REMOTE_USER} ^[0-9]*$

acheve this? I have really not got to grips with regular expressions yet!

Thinking I might start off with something like this, and look into the cgi
script when time permits.

Thanks for your help.

Rob Keeling


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.