Re: header("Location: page.php") not redirecting

From: Date: Mon, 01 Dec 2003 22:39:02 +0000
Subject: Re: header("Location: page.php") not redirecting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171513@lists.php.net to get a copy of this message
hi again, echo looks fine (no error in the URL). I am stumped. Is there anything besides output to the screen before header() that breaks it? thanks On Dec 1, 2003, at 5:13 PM, Chris Shiflett wrote:
--- rogue <rogue@mail.rightcode.net> wrote:
$redirect = "http://" . $_SERVER['HTTP_HOST'] . "/cm/clients/viewclient.php?id={$_REQUEST['id']}&foo=bar"; error_reporting(E_ALL); echo "Location: $redirect"; header("Location: $redirect");
I meant to try using a full URL first, then use echo if it still doesn't work. :-) This shouldn't work as it is, because you have output prior to your header call. But, since you already tried this, what did the echo output? Did it look correct? Comment that out, and see what happens. Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/


« previous php.general (#171513) next »