httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] RewriteMap substitutions in RewriteRule
Date Fri, 12 Aug 2005 17:14:46 GMT
On 8/12/05, Tony VanScoy <> wrote:
> As a testing purpose I changed my mapping script to this ...
> <?php
> echo "somefile.php\n";
> ?>
> so no matter what I send, it outputs a filename + newline to stdout. i
> didn't have the newline character before, so i restarted the server
> and tested. great, it works. now try the same url again and it doesn't
> output a filename, just boots me to .

I'm afraid you may have caugt a slight case of
not-reading-the-documentation-carefully-enough-itis.  Unfortunately,
when dealing with mod_rewrite, this affliction can be deadly.

If you look carefully at the example map program here:
even without perl skills, you should be able to get the key point: the
script needs to loop on standard input.  It is not started fresh for
each request.  It is started only once and each request gives it a new
line of standard input.  So your script must loop on standard input,
processing stdin one line at a time and writing its results to
standard output.


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