james,

don't print out anything before the redirect statement.  the redirect is
actually a form of HTTP header, so by printing th eheader first, you end up
printing out 2 headers and the redirect fails.....

hth,
brent



                                                                                       
                                                
                      james                                                            
                                                
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                                
                      xas.edu>                 cc:       (bcc: Brent 
Michalski/STL/MASTERCARD)                                         
                                               Subject:  help with redirect in CGI.pm  
                                                
                      10/15/02 12:40 PM                                                
                                                
                                                                                       
                                                
                                                                                       
                                                




hi!
i've written a test.cgi that has these lines:

*#!/usr/bin/perl -w

use strict; # enforce variable declarations and quoting
use DBI;
use CGI qw(:standard);
use Image::Size;


print header, start_html(-title=>"UT-Austin University Supply Services");
print redirect('http://www.utexas.edu');

print end_html;*

(yes, this is a stripped-down cgi from the one that exhibits the
redirect problem).

the error i get, whether i redirect to a local file, which is what i
want to do, or redirect to another site, as i've done here, is:

*Status: 302 Moved Location: http://www.utexas.edu*

(replace 'http://www.utexas.edu' with whatever it is i'm trying to
redirect to)

does anyone know why this is happening and how i can fix it?

thanks,
james



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to