Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 91538 invoked from network); 5 Feb 2009 07:49:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2009 07:49:23 -0000 Received: (qmail 30647 invoked by uid 500); 5 Feb 2009 07:49:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 30629 invoked by uid 500); 5 Feb 2009 07:49:13 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 30620 invoked by uid 99); 5 Feb 2009 07:49:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 23:49:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.174 as permitted sender) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 07:49:03 +0000 Received: from [192.168.250.51] (p549EA734.dip0.t-ipconnect.de [84.158.167.52]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id n157mZ4D010727 for ; Thu, 5 Feb 2009 08:48:38 +0100 Message-ID: <498A98CB.4000701@ice-sa.com> Date: Thu, 05 Feb 2009 08:44:11 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <1233816613.3309.12.camel@mattlaptop2.local> In-Reply-To: <1233816613.3309.12.camel@mattlaptop2.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8951/Thu Feb 5 06:07:22 2009 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] How to serve up different content depending on authenticated user 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@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 > 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 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