Redirecting from a page

Discussion in 'HTML & Website Design' started by xxfirexx, Mar 28, 2008.

  1. #1
    xxfirexx, Mar 28, 2008 IP
  2. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #2
    <meta http-equiv="Refresh" content="1; URL=http://www.game.com">
    Code (markup):
     
    kber, Mar 28, 2008 IP
  3. MikeDVB

    MikeDVB Peon

    Messages:
    113
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would use Mod_rewrite if it's available.

    In the .htaccess file

    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} ^/test.html [NC]
    RewriteRule ^(.*)$ http://www.game.com/ [R=301,L]
    PHP:
    This will be search-engine friendly and R=301,L makes it a Permanent Redirect. I believe 302 is Temporary.

    This is the *best* way to do a redirect, it also avoids the problem of when you try to hit the back button it constantly goes forward again.
     
    MikeDVB, Mar 28, 2008 IP
  4. xxfirexx

    xxfirexx Banned

    Messages:
    327
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ty so much
     
    xxfirexx, Mar 28, 2008 IP
  5. eaglewavepro.com

    eaglewavepro.com Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the question is, do you want to display a message for 10sec (eaxample) and then redirect or immediately ?
     
    eaglewavepro.com, Mar 29, 2008 IP
  6. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #6
    This code will redirect the old page to the new page after 1 second
     
    kber, Apr 10, 2008 IP