Redirect outbound links

Discussion in 'Site & Server Administration' started by JohnZing, Mar 19, 2007.

  1. #1
    Hi,

    I want to use some kind of redirects for my website forum outbound links.
    Lets say some user types
    "This site www.SomeSite.com is cool"

    The descripton remains the same but the outbound link will be
    a) www.MySite.com/redirect/?go=www.SomeSite.com

    OR

    b) javacript: go('www.SomeSite.com') - then some kind of javascript redirect or... well I have to think about it...

    The idea/goal is : log outbound links in my database

    Questions:
    - Which method is better... a or b ?
    - Is googlebot friendly? Or I'm asking for problems with mister G?

    Thanks and Have a nice day.
     
    JohnZing, Mar 19, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    If you're using a web analytics solution, you can usually track jump-off pages without implementing any extra code yourself
     
    frankcow, Mar 19, 2007 IP
  3. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Server side method (a) is better IMO.

    What are you hoping to achieve by doing this?
     
    mad4, Mar 19, 2007 IP
  4. NetMidWest

    NetMidWest Peon

    Messages:
    1,677
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'll agree, provided that the status codes on those links are 301's.
     
    NetMidWest, Mar 19, 2007 IP
  5. JohnZing

    JohnZing Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The idea is: log all the clicked outside links
    Lets say some user clicks on www.digitalpoint.com link inside MyPage.php.
    I get a new entry in my database

    DateTime ; FromPage ; ToURL
    13 Mar 2007 12:21 ; mypage.php ; www.digitalpoint.com
     
    JohnZing, Mar 19, 2007 IP
  6. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #6
    In that case it might be slicker to use a javascript onclick event in your links which calls an ajax function and updates the database.

    <a href="http://www.link.com" onClick="linkscript()">Click</a>
    Code (markup):
     
    mad4, Mar 19, 2007 IP