Re: 301 redirect returning 302 instead
| From: | ianevans at digitalhit dot com | Date: | Sun, 05 Nov 2006 07:28:54 +0000 |
| Subject: | Re: 301 redirect returning 302 instead | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244224@lists.php.net to get a copy of this message | ||
Chris,
I just posted this to php-internals in response to someone else, but this
tale of woe shows the problem:
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://...");
exit();
produces a 302.
header("Location: http://...");
header("HTTP/1.1 301 Moved Permanently");
exit();
produces a 302.
header("Location: http://...",false,301);
produces a 302 and, for good luck,
header("Location: http://...",true,301);
produces a 302.
Everything's producing a 302. So you can see the dilemma.