Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 22894 invoked from network); 31 May 2007 14:53:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 May 2007 14:53:49 -0000 Received: (qmail 98360 invoked by uid 500); 31 May 2007 14:53:43 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 98344 invoked by uid 500); 31 May 2007 14:53:43 -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 98333 invoked by uid 99); 31 May 2007 14:53:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 07:53:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.18.107.89] (HELO netbits.us) (209.18.107.89) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 31 May 2007 07:53:37 -0700 Received: (qmail 7366 invoked by uid 0); 31 May 2007 14:52:43 -0000 Received: from trutwins.homeip.net (dhcp.212225.en-tel.net [69.46.212.225]) by fastconcepts.com ([65.17.208.228]) with SMTP via SSL; 31 May 2007 14:52:43 -0000 Received: (qmail 18171 invoked by uid 5033); 31 May 2007 14:53:14 -0000 Received: from 192.168.0.2 by rachmaninoff (envelope-from , uid 0) with qmail-scanner-1.25 (clamdscan: 0.90.2/3205. spamassassin: 3.2.0. Clear:RC:1(192.168.0.2):. Processed in 0.109015 secs); 31 May 2007 14:53:14 -0000 X-Qmail-Scanner-Mail-From: josh@trutwins.homeip.net via rachmaninoff X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.0.2):. Processed in 0.109015 secs) Received: from joplin.trutwins.homeip.net (joplin.trutwins.homeip.net [192.168.0.2]) by trutwins.homeip.net ([192.168.0.244]) with ESMTP via SSL; 31 May 2007 14:53:13 -0000 Date: Thu, 31 May 2007 09:53:04 -0500 From: Josh Trutwin To: users@httpd.apache.org Message-ID: <20070531095304.56d2aa5c@joplin.trutwins.homeip.net> In-Reply-To: References: <20070530135348.27eacaf1@sinkhole.intrcomm.net> <20070530151139.7da07190@sinkhole.intrcomm.net> <20070530212530.66277fbc@prokofiev.trutwins.homeip.net> <20070531084030.3cef06d2@joplin.trutwins.homeip.net> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.6; i586-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] RewriteMap questions On Thu, 31 May 2007 10:06:10 -0400 "Joshua Slive" wrote: > If you can get that to work under load, that's great. But I'd worry > about that program becoming a choke point. Only one request at a > time can be processed through the program. (Make sure you are using > RewriteLock to serialize!) So I would do everything possible to keep > requests that don't need the map out of there. That includes doing > the expensive filesystem checks. Will do - hopefully the load won't be too bad, but we'll see soon I guess... I added this to do the filesytem checks (not sure if there's a better way to condense the conditions): RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule .* ${rewriter:%{REQUEST_FILENAME}^%{REQUEST_URI}} [L, QSA] One last problem I seem to be having is how the program returns NULL - I have this when the program finds a match in the map file: fputs(STDOUT, $map[$uri] . "\n"); When it doesn't find a match though I have it doing this: fputs(STDOUT, "NULL"); Which seemed the correct thing to do per the docs. The request hangs even though the program has output buffering turned off too. I have a link to the php program here if you are curious. http://trutwins.homeip.net/rewriter.phps Thanks, Josh --------------------------------------------------------------------- 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