Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 94476 invoked by uid 500); 14 Jul 2003 23:52:47 -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 94462 invoked from network); 14 Jul 2003 23:52:46 -0000 Received: from out1.smtp.messagingengine.com (HELO mail.messagingengine.com) (66.111.4.25) by daedalus.apache.org with SMTP; 14 Jul 2003 23:52:46 -0000 Received: from mail.messagingengine.com (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 5F38D2503D for ; Mon, 14 Jul 2003 19:52:54 -0400 (EDT) Received: from 10.202.2.150 ([10.202.2.150] helo=mail.messagingengine.com) by messagingengine.com with SMTP; Mon, 14 Jul 2003 19:52:54 -0400 X-Epoch: 1058226774 X-Sasl-enc: N1Hhsfkf5x76YxQj9bAllw Received: from bronfman504 (Toronto-HSE-ppp3743259.sympatico.ca [67.68.76.98]) by www.fastmail.fm (Postfix) with ESMTP id 2B2112512B for ; Mon, 14 Jul 2003 19:52:54 -0400 (EDT) Date: Mon, 14 Jul 2003 19:54:50 -0400 (Eastern Daylight Time) From: Joshua Slive To: users@httpd.apache.org In-Reply-To: Message-ID: References: X-X-Sender: slive@www.fastmail.fm 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] RegEx Matches within LocationMatch and Basic Auth On Mon, 14 Jul 2003, John Kaminski wrote: > I would like to use the regex match as a parameter to the "require user" > paramter. If this can't be done is there something else I can do that would > accomplish the same thing. Thank you for your help in advance. There is no easy way to do this. A difficult way is RewriteEngine On RewriteCond %{REQUEST_METHOD} !(GET|HEAD|OPTIONS) RewriteRule ^/publishers/[^/]*/?(.*) /publishers/%{LA-U:REMOTE_USER}/$1 Require valid-user ... This is untested, and it probably has some errors, but it may give you an idea. Note that it allows any authenticated user to access any url under publishers, but it silently puts them in their own directory no matter where they tried to access. A perhaps cleaner way to do it would be to simply use RewriteEngine On RewriteCond %{REQUEST_METHOD} !(GET|HEAD|OPTIONS) RewriteRule ^/publishers/(.*) /publishers/%{LA-U:REMOTE_USER}/$1 and then all publishers would access the same URL but would be put in the correct directory based on their username. Also note that apache 1.3 has "require file-owner" and "require file-group" configurations in mod_auth. But I don't think they will do what you want. 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