Forum Moderators: coopster & phranque

Message Too Old, No Replies

Error 302 moved temporary

         

sandhyaweb

12:26 pm on Feb 15, 2005 (gmt 0)

10+ Year Member



when executing the code the following error of '302' is coming..

HTTP/1.1 302 (Found) Moved Temporarily
Connection: close
Date: Tue, 15 Feb 2005 12:18:03 GMT
Via: 1.1 PaceNet (NetCache NetApp/5.5R6)
Location: [somesite.com...]
Server: Apache/1.3.33 (Unix) mod_perl/1.29
Content-Type: text/html
Client-Date: Tue, 15 Feb 2005 12:22:07 GMT
Client-Peer: 65.198.151.212:80
Client-Response-Num: 1
P3P: CP="ALL ADMi DEVi PSA CONi OUR DELi SAMi BUS NAV COM CNT ONL INT PHY DEM UNI"
Set-Cookie: JSESSIONID=CRpmBL7Z7hzyzCwCqcCyQx9fHp2cJKryyBkf7SWhsRGPzrTG1X1T!-637755235!NONE; path=/

for that i wrote such code...

if($res->code() eq '302'){

my $newurl = "http://www.somesite.com/talent/index.html";
#Create the HTTP request object
my $new_req = new HTTP::Request GET =>$newurl;
my $new_res = $ua->request($new_req);
#print $new_res->as_string();

but not getting the output.
plz,help me.
thanks..

QuietCat

1:12 am on Feb 20, 2005 (gmt 0)

10+ Year Member



sandhyaweb, if you are trying to redirect the user to another page after your script is done, use something like

use CGI qw/:cgi-lib/;

$Q = CGI->new();

print(
$Q->redirect(
-uri=>"http://www.somesite.com/talent/index.html"
)
);