1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php redirect not working in FF

Discussion in 'PHP & Perl' started by theviralguy, Nov 25, 2009.

  1. theviralguy

    theviralguy Senior Member

    Joined:
    Dec 16, 2008
    Messages:
    970
    Likes Received:
    290
    Location:
    BC
    can someone who knows php help me out? MY redirect code is working fine in IE and chrome but not in firefox?

    Code:
    <?php
    
        {
    
            echo "<meta http-equiv=\"refresh\" content=\"0;url=WEBSITEURL\">";    
    
        }
    
    ?>
    that is the code :)
     
  2. showboytridin

    showboytridin Regular Member

    Joined:
    Sep 5, 2009
    Messages:
    348
    Likes Received:
    716
    Location:
    127.0.0.1
    Well, it 's working here. In Firefox 3.0.15.
     
  3. ukescuba

    ukescuba Senior Member

    Joined:
    Feb 24, 2008
    Messages:
    994
    Likes Received:
    635
    Occupation:
    Mobile Marketer & QR Code Junkie
    Location:
    San Antonio, TX
    Home Page:
    why you doing it in php? there seems to be no variables?

    however its probably the semi colon after the zero thats probably ending the echo command early

    also users can still block meta refresh redirects in firefox see here... http://diveintomark.org/archives/2007/02/08/howto-block-meta-refresh

    or you can always put this on the very first line of your page:

    Code:
    <?php
    header('Location: http://www.google.com/');
    ?>
    see http://php.net/manual/en/function.header.php for more details....
     
    Last edited: Nov 25, 2009
  4. BozoClown

    BozoClown Junior Member

    Joined:
    Jan 4, 2009
    Messages:
    150
    Likes Received:
    108
    That should work but if you are still having problems try this
    Code:
    <?php
       echo '<meta http-equiv="refresh" content="0;url=WEBSITEURL;refresh=1">';
    ?>
    
     
    Last edited: Nov 26, 2009