Linking

Discussion in 'Programming' started by fairuz.ismail, Feb 11, 2008.

  1. #1
    which one do you prefer and why?

    1) link using old fashion way

    <a href="http://www.domain.com">Click Here!</a>
    PHP:
    2) using external php file

    <a href="redirect.php?url=http://www.domain.com">Click Here!</a>
    PHP:
    and in redirect.php

    <?php
    header("Location : ".$_GET['url']."");
    ?>
    PHP:
    thanks
     
    fairuz.ismail, Feb 11, 2008 IP
  2. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Is this for redirection or links? I would have to say adding the location header with php and using meta tags are the best redirection method. . .
     
    ToddMicheau, Feb 11, 2008 IP
  3. Possibility

    Possibility Peon

    Messages:
    350
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    For SEO purposes, the first one. For tracking purposes, the second one.
     
    Possibility, Feb 11, 2008 IP
  4. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it's for linking...

    do you know how to have the SEO benefits using the the second solution>?
     
    fairuz.ismail, Feb 11, 2008 IP
  5. Possibility

    Possibility Peon

    Messages:
    350
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm not sure how to get the seo benefits. However, you could try something like having the href point directly to the site like on the first example, but through use of javascript and ajax and the onClick event record each hit out on the link.
     
    Possibility, Feb 12, 2008 IP
    fairuz.ismail likes this.
  6. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thats a good point...rep for you !! i'll try that out..
     
    fairuz.ismail, Feb 12, 2008 IP