Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26316 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8791 invoked by uid 1010); 4 Nov 2006 06:58:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8775 invoked from network); 4 Nov 2006 06:58:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2006 06:58:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=ianevans@digitalhit.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ianevans@digitalhit.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain digitalhit.com designates 67.19.142.122 as permitted sender) X-PHP-List-Original-Sender: ianevans@digitalhit.com X-Host-Fingerprint: 67.19.142.122 7a.8e.1343.static.theplanet.com Linux 2.4/2.6 Received: from [67.19.142.122] ([67.19.142.122:44455] helo=mail.digitalhit.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/83-08797-D0A3C454 for ; Sat, 04 Nov 2006 01:58:21 -0500 Received: (qmail 17834 invoked by uid 509); 4 Nov 2006 01:57:24 -0500 Received: from 127.0.0.1 by digitalhit.com (envelope-from , uid 508) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.4/1673. spamassassin: 3.1.4. perlscan: 1.25-st-qms. Clear:RC:1(127.0.0.1):. Processed in 0.064149 secs); 04 Nov 2006 06:57:24 -0000 X-Antivirus-MYDOMAIN-Mail-From: ianevans@digitalhit.com via digitalhit.com X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(127.0.0.1):. Processed in 0.064149 secs Process 17828) Received: from localhost (HELO www.digitalhit.com) (ianevans@digitalhit.com@127.0.0.1) by mail.digitalhit.com with SMTP; 4 Nov 2006 01:57:24 -0500 Received: from 64.231.34.61 (SquirrelMail authenticated user ianevans@digitalhit.com) by www.digitalhit.com with HTTP; Sat, 4 Nov 2006 01:57:24 -0500 (EST) Message-ID: <3799.64.231.34.61.1162623444.squirrel@www.digitalhit.com> Date: Sat, 4 Nov 2006 01:57:24 -0500 (EST) To: internals@lists.php.net User-Agent: SquirrelMail/1.4.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Problems with 301 redirects From: ianevans@digitalhit.com Someone on the php-general list suggested I write here before submitting this to bugs.php.net to see if it was a known issue. Having a problem here trying to redirect some old pages. Running php 5.1.4 as fastcgi under lighttpd. I've recently noticed using a server header check that my 301 redirects in PHP are returning 302 instead. I'm using the following code: header("Status: 301 Moved Permanently"); header("Location: mynewurl"); exit(); The header checker is returning this: #1 Server Response: oldurl HTTP Status Code: HTTP/1.0 302 Found Connection: close X-Powered-By: PHP/5.1.4 Location: mynewurl Any reason why we're getting a 302 instead of a 301? This is keeping the pages in Google instead of removing them and using the new location. As per suggestions on the general list I've tried the status line before and after the location. I've used the HTTP version instead of the "Status:" etc. -- Ian Evans Chairman & Executive Producer DigitalHit.com -- Ian Evans Chairman & Executive Producer DigitalHit.com -- Ian Evans Chairman & Executive Producer DigitalHit.com