Anyone there HTML Master?

Discussion in 'HTML & Website Design' started by seo.logan, Dec 30, 2009.

  1. #1
    Please help me with redirection code.i want html code for redirection. E.g
    i wanna redirect xyz.com to mysite.com

    Please tell me the exact code for that..thanks.
     
    seo.logan, Dec 30, 2009 IP
  2. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Inside of the head tag on xyz.com insert the following code.

    
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://mysite.com/">
    
    Code (markup):
     
    LeetPCUser, Dec 30, 2009 IP
  3. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Yes, that will work. But if your hosting supports PHP then it will be far better to use:

    
    <?php header( 'Location: http://www.xyz.com' ) ; ?>
    
    Code (markup):
     
    Amsterdam, Dec 30, 2009 IP
  4. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #4
    <script>window.location.href = "www.xyz.com";
    </script>
     
    rkstech, Dec 30, 2009 IP
  5. jagadishthaker

    jagadishthaker Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The meta refresh method is not good from SEO point of view, if your site is hosted on apache,linux you can use .htaccess to redirect the old page with new page.

    Thanks!
     
    jagadishthaker, Dec 30, 2009 IP
  6. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    He stated he wanted a way to do it in HTML. I know it is not the preferred method, but that is the only HTML way I know of.

    I would recommend php location.
     
    LeetPCUser, Dec 31, 2009 IP
  7. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #7
    Use Javascript code i gave above
     
    rkstech, Jan 4, 2010 IP