Just one thing: why do you set the Content-Type [T] of a redirect [R]?? 

-ascs

-----Original Message-----
From: Tony VanScoy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 17, 2005 10:06 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

> Have you tried it?  What happened?

It worked after a few modifications

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

The quotes are passed along with the values so I didn't use them.
Here's what works

RewriteRule ^/getpdf\.php$
/pdf/${pdfFile:"%1_%{HTTP_REFERER}_%{REMOTE_HOST}"}?
[R,L,T=application/pdf]

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

My mapping program only makes two database queries, one to get the filename, 
and a second query to log the download. By default i have it sending back 
"NULL\n". That value only gets changed if both queries execute without error. 
I'm using @ to prevent any error output.

Thanks for your help.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to