httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Trutwin <>
Subject Re: [users@httpd] RewriteMap questions
Date Thu, 31 May 2007 14:53:04 GMT
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

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.



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message