I have created a file called "nph-select.pl" and put code for redirection as below.
#!"D:\xampp\perl\bin\perl.exe" -w
use CGI qw/:standard/;
my $cgi = new CGI;
print $cgi->redirect(-uri => 'http://www.google.com/', -nph => 1);
and executing file then its gives me 302 STATUS message saying "Document has moved here" . But when I am renaming the same file just by removing "-" in it i.e new file name is "nphselect.pl" then it run properly with redirection also. Can anybody suggect what setting I am missing?
My request headers are
Host localhost:8080
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Connection keep-alive
And RESPONSE HEADERS are blank.
#!"D:\xampp\perl\bin\perl.exe" -w use CGI qw/:standard/; my $cgi = new CGI; print $cgi->redirect(-uri => "http://perl.about.com/", -nph => 1);
– Rahul Jul 06 '11 at 08:58Host localhost:8080 User-Agent Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip, deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive
AND RESPONSE Headers are blank – Rahul Jul 07 '11 at 08:44