rewrite map (prg:) never finishes
- by SooDesuNe
using Apache and a prg type rewrite map. My map looks like:
#!/usr/bin/perl
$| = 1; # Turn off buffering
while (<STDIN>) {
print "someothersite.com";
}
the rewrite rule declared in httpd.conf is:
RewriteMap app_map prg:/file/path/test.pl
RewriteRule (\/[\w]+)(\/[^\#\s]+)?$ http://${app_map:$1}$2 [P,L]
And the log files show:
init rewrite engine with requested uri /a/testlink.html
applying pattern '(\/[\w]+)(\/[^\#\s]+)?$' to uri '/a/testlink.html'
It appears like test.pl is never giving control back to apache, when the map is successfully found I expect to see this output in the log file:
map lookup OK: map=app_map key=/a -> val=someothersite.com
Why is my map not returning control back to apache?