For anyone running PHP on Apache as a CGI binary, if you attempt a redirect such as:
Header("Location: /test.php");
you'll notice that the content on the page changes, but the address doesn't in the URL bar of your browser.
I found this today:
* Location
This is used to specify to the server that you are returning a
reference to a document rather than an actual document.
If the argument to this is a URL, the server will issue a redirect
to the client.
If the argument to this is a virtual path, the server will
retrieve the document specified as if the client had requested
that document originally. ? directives will work in here, but #
directives must be redirected back to the client.
What this means is that you need to use the full URL of the page, not the relative path name. When you use a relative path name, it grabs the content internally and does not send a redirect status to the client.
You could use something like this instead, therefore:
Header("Location: ${SERVER_NAME}/test.php");
Hope this helps out some people. I know I've been stumped for a long time with this.