Re: RewriteMap questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 31 May 2007 10:06:10 -0400
"Joshua Slive" <joshua@xxxxxxxx> 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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux