Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 17281 invoked by uid 500); 5 Mar 2003 16:11:44 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 17217 invoked from network); 5 Mar 2003 16:11:43 -0000 Received: from venus.commerce.ubc.ca (137.82.154.16) by daedalus.apache.org with SMTP; 5 Mar 2003 16:11:43 -0000 Received: from exchange.commerce.ubc.ca (exchange.commerce.ubc.ca [137.82.66.44]) by venus.commerce.ubc.ca (8.9.3/8.9.3) with ESMTP id IAA10645 for ; Wed, 5 Mar 2003 08:11:44 -0800 Received: from usager73-183.hec.ca ([132.211.73.183]) by exchange.commerce.ubc.ca with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id FS7YFMC7; Wed, 5 Mar 2003 08:12:07 -0800 Date: Wed, 5 Mar 2003 11:11:39 -0500 (Est) From: Joshua Slive To: users@httpd.apache.org In-Reply-To: Message-ID: References: X-X-Sender: slive@exchange.commerce.ubc.ca MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] problem configuring mod_rewrite rule On Wed, 5 Mar 2003, Michael Klama wrote: > Owen, > You are correct in my misunderstanding of what mod_rewrite is capable of > doing. What I was trying to do was change the doc root based on the login > info. Sorry if I took up your valuable time trying to do something that is > not possible. I will try your suggestion regarding creating a separate VH > for each user for the redirection I am looking for. Thank you for all of > your time and help. I will post with the result so others may use this > solution in a similar situation. > > -----Original Message----- > From: Boyle Owen [mailto:Owen.Boyle@swx.com] > If so, you have a major misunderstanding of mod_rewrite. It rewrites URLs - > not filepaths. It turns one URL into another URL so the final destination > still has to be a URL. But you want to change an internal filepath and that > is not within the scope of mod_rewrite. I haven't been following this thread, so I may be mistaken about the context, but I don't believe this is correct. To put it in Apache terms, mod_rewrite can act either like a Redirect or an Alias. Using the [R] flag or supplying an absolute URL causes mod_rewrite to send a redirect. Using just a file-system or url-path causes mod_rewrite to simply deliver the content without redirecting. In other words, mod_rewrite can transparently change the content delivered by a URL without actually changing the URL in the browser. If my very quick skimming of the thread is correct, then the original poster's problem is likely that %{REMOTE_USER} is not available in the server-wide context, because this context is evaluated before the user authentication is complete. But there is a way around this: use %{LA-U:REMOTE_USER} to ask mod_rewrite to perform a "look-ahead" to find out what the REMOTE_USER will be once auth is complete. See the mod_rewrite docs for details: http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritecond (special note 4). Joshua. --------------------------------------------------------------------- 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