Forum Moderators: coopster

Message Too Old, No Replies

HELP! Baffling 301 Redirect Behavior

Firefox Loads Old page, Internet Explorer Loads Nothing!

         

Planet13

6:44 pm on Apr 21, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



EDIT: Before You Read This, it looks like I figured it out. Looks like I forgot to include Location: in the second header tag.

~~~~~~~~~~~~~~~~~~~~~~~~

Hi there, Everyone:

I am using a php header to do a 301 redirect and I am getting some weird results.

firefox shows the old page (without redirecting)

Internet Explorer 8 says that it can't display the page

Fetch as googlebot says HTTP/1.1 301 Moved Permanently was successful, as does the Live http headers tool in FF.

Here is the code I am using:

<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "http://www.example.com/blog/kali-hindu-goddess/" );
?>

the original page was:

<snip>

I thought it was my computer, but the new page has seen a huge drop in traffic, so I think there MUST be some problem with the redirection.

(a quick thought: if it is a chain redirect will that mess up the php header function? Still, that wouldn't explain why I can't get the old page to load and redirect in internet explorer 8)

Thanks in advance.

[edited by: eelixduppy at 1:14 am (utc) on Apr 23, 2012]
[edit reason] example.com [/edit]

Leosghost

6:57 pm on Apr 21, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Opera loads the new one via the re-direct just fine.

But the admins / mods will remove the refs and link to your site..

g1smd

7:01 pm on Apr 21, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, missing "Location: " from the second header would be a problem!

For the first header, some people use
Header("HTTP/1.1 301 Moved Permanently")

while others use
Header("Status: 301 Moved Permanently")


I've not tested the difference (i.e. one might be wrong).