Hello,
I have a perl script which tries to redirect the URL to another page. It
gives peculiar problem. The resultant page source is as follows
---------------------------
<HTML><HEAD><META HTTP-EQUIV="Set-Cookie" CONTENT="visirotid=880; path=/;
domain=www.trichurgateway.com;"></HEAD><BODY></BODY></HTML>
Content-type: text/html
Location: /scripts/visitorinfo.cgi?pageid=mailhdr&lang=EN
-------------------------
As you can see, the Content-type and Location information is shown in the
screen rather than really taking the url.
THe perl code is as follows:
First I am setting the cookie.
print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<META HTTP-EQUIV=\"Set-Cookie\" CONTENT=\"visirotid=$visitorid;
path=/
; domain=www.trichurgateway.com;\">";
print "</HEAD><BODY></BODY></HTML>\n";
Immediately after this, Iam trying the recirect.
print "Content-type: text/html "."\n\n";
print "Location:
/scripts/visitorinfo.cgi?pageid=mailhdr&lang=EN\n\n";
exit 0;
This results in the page as given above. IN the Location, I tried giving
full url including the domain name. Also, I tried to use CGI->redirect also.
It showed the page moved to new location error on the screen. Not the actual
page.
This is running on a Raq3i server with perl 5.0.6 and mod-perl (version I am
not sure) and Embperl.
Any help is greatly appreciated.
Thanks
Vijay Nair