httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt McCutchen <m...@mattmccutchen.net>
Subject Re: [users@httpd] How to serve up different content depending on authenticated user
Date Thu, 05 Feb 2009 06:50:13 GMT
On Thu, 2009-02-05 at 15:13 +1000, Steve Dalton wrote:
> I'm running apache 2.2 on Ubuntu and I need to serve up a different
> directory depending on the user that is authorised with the server.
> I've check the mailing list and apache docs but haven't found much so
> far - I may just not have the proper search terms though (I don't know
> how best to describe it)
> 
> eg.
> 
> http://spidie@foo.com -> /var/www/private/spidie
> http://fred@foo.com -> /var/www/private/fred

How about this:

RewriteEngine On
RewriteRule ^(.*)$ /var/www/private/%{REMOTE_USER}/$1

-- 
Matt


---------------------------------------------------------------------
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


Mime
View raw message