|Subject:||NPH and RewriteEngine in Apache|
I've got a tiny nph-script, like so: #!/usr/bin/perl -wT use strict; use CGI qw/*table -nph :standard/; my $cgi = new CGI; $cgi->nph(1); print $cgi->header(-nph=>1); print "Hello world!\n"; It works when called as 'nph-myscript' and as 'myscript', but it prints "Hello world!" first and the headers after if I save it as nph-myscript and call it with a redirected request from Apache: RewriteEngine on RewriteBase /db/ RewriteRule ^study(.*) nph-myscript/study$1 In other words, it's ignoring the value of '-nph', nph() and -nph=>1, but paying attention to whether the *orginal* request started with nph- or not. This is with Apache 2.2.2 on Fedora Core 5 on an x86.