How to do a hard redirect

Discussion in 'HTML & Website Design' started by Ripped, May 21, 2008.

  1. #1
    How to do a hard redirect, and is it allowed by clickbank to do this with your hoplink?
     
    Ripped, May 21, 2008 IP
  2. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Or by meta tag (change 6 to number of seconds for a redirection to start, and change website.com to a location where it should redirect):

    I don't know if it's allowed by Clickbank... I've never used it.
     
    risoknop, May 21, 2008 IP
  3. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Thanks,
    The server I'm using doesn't support PHP so I'm gonna
    try this:
    <meta http-equiv="refresh" content="6;URL=http://website.com" />

    Thanks for the help
     
    Ripped, May 21, 2008 IP
  4. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #4
    The meta tag worked, however the you have to wait few seconds for the redirect to take action, I tried also:
    <meta http-equiv="refresh" content="0;URL=http://website.com" />
    And I still had to wait a few seconds, any faster way to redirect? (no php)

    EDIT: <meta http-equiv="refresh" content="0;URL=http://website.com" /> redirects after about a second which is good enough for me,
    However I first tried it with opera and it redirected after 5-6 seconds, but with Firefox and IE it works well
     
    Ripped, May 21, 2008 IP
  5. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm not sure about that - I believe that if you put there 0 the redirect should start immidiately... maybe it just takes some time for server read the code...
     
    risoknop, May 21, 2008 IP
  6. riya_senk

    riya_senk Well-Known Member

    Messages:
    2,013
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    160
    #6
    Change it to

    <meta http-equiv="refresh" content=0;URL=http://www.google.com />
    HTML:
     
    riya_senk, May 21, 2008 IP
  7. popnyc

    popnyc Active Member

    Messages:
    1,391
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    75
    #7
    thanks for posting this redirect script.
    I put it under my <title>
    and above my </HEAD>
    It works, so I guess that is the proper place to put it?

    Does anyone know if this redirect script can be geotarged? I have a redirect for USA and another link for Canada.
     
    popnyc, Aug 14, 2008 IP
  8. Chifforobe

    Chifforobe Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    the best method for a permanent redirect is to use a 301 in an .htaccess file.

    create an empty text file in the root of the page you want to redirect. name it .htaccess

    put this code in it.
    
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]
    
    Redirect 301 /myoldpage.html http://www.mynewsite.com/about
    Redirect 301 /anotheroldpage.html http://www.mynewsite.com/anotherpage
    
    Code (markup):
    this is the best to redirect a site.
     
    Chifforobe, Aug 15, 2008 IP