Re: Browser Redirection

2001-10-13 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Brett W. McCoy) wrote: > On Fri, 12 Oct 2001, Carl Franks wrote: > > if (condition) { > > print "Location:page.html\n\n"; > > } else { > > print "Content-type: text/html\n\n"; > > print "...html..."; > > } > > } > BTW, for a Location hea

Re: Browser Redirection

2001-10-12 Thread Carl Franks
I know, I just cut the code right back for clarity before posting it (maybe silly thing to do?) Thanks carl > if (condition) { > print "Location:page.html\n\n"; > } else { > print "Content-type: text/html\n\n"; > print "...html..."; > } > } BTW, for a Location header, you should an absolu

Re: Browser Redirection

2001-10-12 Thread Brett W. McCoy
On Fri, 12 Oct 2001, Carl Franks wrote: > if (condition) { > print "Location:page.html\n\n"; > } else { > print "Content-type: text/html\n\n"; > print "...html..."; > } > } BTW, for a Location header, you should an absolute URL and not a relative URL, even if it's on the same server as the

Re: Browser Redirection

2001-10-12 Thread Carl Franks
Thanks everyone who replied, What I was doing was quite simple, and I know what was going wrong. I WAS using... print "Content-type: text/html\n\n"; if (condition) { print "Location:page.html\n\n"; } else { print "...html..."; } } Whereas I SHOULD have used... if (condition) { print "Loca

RE: browser redirection

2001-10-11 Thread Denis Beaulieu
to do so I use CGI.pm module, $query = new CGI; ... don't insert header before the redirection!!! In such a case it don't work. $query->redirect("THE URL"); that is't and is work fine. Denis -Original Message- From: Grierson, Garry (UK07) [mailto:[EMAIL PROTECTED]] Sent: Thursday, Oct

Re: Browser Redirection

2001-10-10 Thread Michael Kelly
> From: [EMAIL PROTECTED] (Randal L. Schwartz) > Organization: Stonehenge Consulting Services; Portland, Oregon, USA > Date: 10 Oct 2001 15:32:01 -0700 > To: [EMAIL PROTECTED], [EMAIL PROTECTED] (Michael Kelly) > Subject: Re: Browser Redirection > >>>>>>

Re: Browser Redirection

2001-10-10 Thread Randal L. Schwartz
> "Michael" == Michael Kelly <[EMAIL PROTECTED]> writes: Carl> print "Content-type:text/html\n\n"; >> >> needs a space to be compliant. "Content-type: text/html" Michael> Not exactly. Carl is already printing the content-type, Michael> complete with two newlines, which ends the headers. [.

Re: Browser Redirection

2001-10-10 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Brett W. McCoy) wrote: > On Wed, 10 Oct 2001, Michael Kelly wrote: > > > print "Content-type: text/html\n"; > > print "Location: http://www.mysite.com/page.html\n\n";; > This is incorrect also, because the "Location: ...\n\n" is an http heade

Re: Browser Redirection

2001-10-10 Thread Brett W. McCoy
On Wed, 10 Oct 2001, Michael Kelly wrote: > print "Content-type: text/html\n"; > print "Location: http://www.mysite.com/page.html\n\n";; This is incorrect also, because the "Location: ...\n\n" is an http header and should not be used after a Content-type header is sent to the browser. It should

Re: Browser Redirection

2001-10-10 Thread Michael Kelly
> From: [EMAIL PROTECTED] (Randal L. Schwartz) > Organization: Stonehenge Consulting Services; Portland, Oregon, USA > Date: 10 Oct 2001 09:06:34 -0700 > To: [EMAIL PROTECTED] > Subject: Re: Browser Redirection > >>>>>> "Carl" == Carl Franks <[EM

Re: Browser Redirection

2001-10-10 Thread Randal L. Schwartz
> "Carl" == Carl Franks <[EMAIL PROTECTED]> writes: Carl> Hi Carl> I'm having trouble using perl to redirect a browser to another page. Carl> If the script has the line Carl> print "Content-type:text/html\n\n"; needs a space to be compliant. "Content-type: text/html" Carl> print "Location

Re: browser redirection

2001-10-10 Thread Jan-Willem Haaring
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.m