Re: How to serve up different content depending on authenticated user

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

 



Matt McCutchen wrote:
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@xxxxxxx -> /var/www/private/spidie
http://fred@xxxxxxx -> /var/www/private/fred

How about this:

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

The above assuming that indeed the users are "authorised" (or rather in this case "authenticated") by the time the rule kicks in. But since the users can only be authenticated based on some "Auth..." section with a "Require ..." , where would these rules be ?
Isn't there some chicken-and-egg situation there ?





---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux