Re: RewriteMap questions

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

 



On 5/31/07, Josh Trutwin <josh@xxxxxxxxxxxxxxxxxxx> wrote:

Here's what I'm currently doing:

In httpd.conf:

RewriteMap rewriter prg:/usr/local/bin/rewriter.php

In vhosts .htaccess file:

RewriteEngine On

RewriteRule .* ${rewriter:%{REQUEST_FILENAME}^%{REQUEST_URI}} [L,QSA]

I have to "pass" in the both of these so I can find the docroot for
the vhost then find the map file which will always be in the same
location for each vhost.

So far it seems to be doing ok.  I was going to add RewriteCond for
checking the the REQUEST_FILENAME actually exists, but I guess that
is an expensive check so I'm having the program handle this too.

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.

Joshua.

---------------------------------------------------------------------
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