httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] RewriteMap and sending more then 1 var
Date Wed, 17 Aug 2005 19:13:28 GMT
On 8/17/05, Tony VanScoy <> wrote:
> .. works great. My question is about sending more then just 1
> backreference to the map program. In this case, I'm sending %1. Can I
> add to that? What if i wanted to also send the  HTTP_REFERER, or the
> REMOTE_HOST? These values would be great since I use the mapping
> program to log the downloads to a database.
> Would something like this work?

Have you tried it?  What happened? 

> RewriteRule ^/getpdf\.php$
> /pdf/${pdfFile:"%1|%{HTTP_REFERER}|%{REMOTE_HOST}"}?
> [R,L,T=application/pdf]
> I could just make one long string to be sent, with the values
> separated by a pipe, where my mapping program could parse through and
> get each individual value. I'm sure you know what I'm looking for at
> this point and time, so any feedback on ways to do this would be
> appreciated.

Your idea is basically fine, except you should pick a character other than 
|, because that character is special in a rewritemap (used to
designate a default value).  (Perhaps it doesn't matter if it is in
quotes; I've never tried this myself.)

But you worry me a little when you talk about all the stuff you are
doing in your RewriteMap.  These programs should be extremly simple
because they run as root, and they are a choke point in that only one
request at a time can be processed through the RewriteMap.


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