Simple redirect..How?

Discussion in 'HTML & Website Design' started by super, Oct 5, 2006.

  1. #1
    Like i promote hostgator so i would like they think they go to www.mysite.com/hostgator but i redirect that page to hostgator site with my aff link
    How can i do that?
    thanks
     
    super, Oct 5, 2006 IP
  2. fordP

    fordP Peon

    Messages:
    548
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <meta http-equiv="refresh" content="5;url=https://www.hostgator.com">
    
    Code (markup):
    add that to your meta tag on mysite.com/hostgator/index.htm
     
    fordP, Oct 5, 2006 IP
  3. fordP

    fordP Peon

    Messages:
    548
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #3
    actually, make an htaccess file in your /hostgator directory and then put

    Redirect 301 / http://www.hostgator.com/
    
    Code (markup):
    this will be more search engine friendly, and will actually work every time
     
    fordP, Oct 5, 2006 IP
  4. super

    super Well-Known Member

    Messages:
    1,019
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    130
    #4
    Thnx, just a question how do i make that htacces file? :eek:
     
    super, Oct 5, 2006 IP
  5. Kaushal

    Kaushal Peon

    Messages:
    185
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #5
    just make in normal notepad and just save it as .htacess
     
    Kaushal, Oct 6, 2006 IP
  6. super

    super Well-Known Member

    Messages:
    1,019
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    130
    #6
    cool, thanks for the answer
     
    super, Oct 6, 2006 IP
  7. fireshark

    fireshark Peon

    Messages:
    190
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or <?php header("Location: http://www.so-and-so.com"); ?>
     
    fireshark, Oct 7, 2006 IP
  8. ecommerce_guru

    ecommerce_guru Notable Member

    Messages:
    1,903
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    255
    #8
    Javascript:
    <SCRIPT LANGUAGE="JavaScript">
    window.location="http://www.yourdomain.com/";
    </script>
    ASP: <%response.redirect ("page2.asp")%>
    PHP: <?php header("Location: http://www.domain.com"); ?>
    HTML: <meta http-equiv="refresh" content="5;url=https://www.domain.com">
     
    ecommerce_guru, Oct 8, 2006 IP
  9. wiggly123

    wiggly123 Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    going to use when I get home...
     
    wiggly123, Oct 12, 2006 IP
  10. blabla11

    blabla11 Peon

    Messages:
    164
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    blabla11, Oct 21, 2006 IP
  11. xharrisonx

    xharrisonx Peon

    Messages:
    524
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I think you could set that up in cpanel or whatever you use.
     
    xharrisonx, Oct 21, 2006 IP
  12. blabla11

    blabla11 Peon

    Messages:
    164
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    hmm, i just discovered that if i write /forum and one random letter in it (like fo3rum, forum9, fordm) it redirects to /forum.

    I probably don't need any redirects now or do I?
     
    blabla11, Oct 21, 2006 IP
  13. prosman

    prosman Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    those are all redirect codes :)
     
    prosman, Oct 21, 2006 IP
  14. Eagle Eyes

    Eagle Eyes Well-Known Member

    Messages:
    413
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #14
    Guys do you know about 301 302 and 303 redirects? Which one is more search engine friendly?
     
    Eagle Eyes, Oct 22, 2006 IP