When you use print "Location: http://www.mysite.com/page.html\n\n";
to redirect you should never print "Content-type: text/html\n\n"; before it. When printing "Content-type: text/html\n\n" you tell the receiving browser that anything after that line is text/html. The line "Location http://www.mysite.com/page.html\n\n" is not HTML, it is a HTTP command just like Content-type. Hope that helps you out. - Jan-Willem On Mon, 8 Oct 2001, Carl Franks wrote: > Hi > I'm having trouble using perl to redirect a browser to another page. > the following script works: > > #!/usr/bin/perl > print "Location:http://www.mysite.com/page.html\n\n"; > > but if the script has the line > > print "Content-type:text/html\n\n"; > > in it first, the redirect doesn't work. > I want to use it in a long script which will either redirect or print html, > depending on variables. > Is it possible to explicitly change the print content-type when I want to > use a redirect, and what would I change it to? > I don't don't know if the redirect is simply failing because of my browser > (IE 5.5 mac), but would like it to work on IE and NN, mac and P.C. > > Thanks > Carl > > www.fireartist.com > > -- > 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]