SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My Links Blew Up )-:

    Hey everyone,

    I'm getting some bizarre errors in my link code and it's happening for all external links to any other site. A good example is the "The Golden Rules" link on my home page, Money-and-Investing.com.

    Here's the code in dreamweaver that I uploaded:
    a href="http://blog.money-and-investing.com/1/the-golden-rules/" style="text-decoration:none"><span class="style6">i</span> The Golden Rules...</a>

    When I go to the site, and view the source, I see:
    <a href="http://blog.money-and-investing.com/1/the-golden-rules/" style="text-decoration:none" onClick="window.location.href='http://www.money-and-investing.com/cgi-bin/counter.pl?url=http&#37;3A%2F%2Fblog.money-and-investing.com%2F1%2Fthe-golden-rules%2F&referrer=http%3A%2F%2Fwww.money-and-investing.com%2Findex.html'; return false;"><span class="style6">i</span> The Golden Rules...</a>

    What is all that bizarre gibberish and how do I keep that from happening? Spiders hate complicated links and all of my external and blog links are a complete mess.

    Thanks!
    Odd Lot
    Last edited by r937; Aug 5, 2008 at 18:36.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    There are several links like that on the page. It looks like all the links to folders, i.e. ending with "/" go to the Perl file. But links to pages, i.e. .html and .html#whatever, are unaltered.
    The Perl file is looking for the referring page, then redirecting. Do you know about that?

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2007
    Location
    Toronto
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The part starting from "onclick" can essentially be deleted, and the links would work fine. It seems you've got some sort of stats tracking system set up and the "onclick" is logging the clicks. If that is the case, then leave them the way they are as spiders will be unlikely to be affected since there's a nice clean "href" being declared anyhow.

    But if you don't need those onclicks then please delete them, for the sake of good clean HTML!

  4. #4
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mitt & Lou,
    Thank you both for your answers. I feel better, I was worried I had some crazy virus or something.

  5. #5
    SitePoint Zealot Ken Sharpe's Avatar
    Join Date
    Apr 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you do need the onClick functionality you should do it unobtrusively using a library like jQuery perhaps.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •