Okay, I don't know if this is possible at all, but if so, does anyone have any ideas of how to do it?
I want to have the href part of an anchor link point to one location for SEO purposes (so a crawler follows it there), but have the click actually take you somewhere else. My idea was to encode an onclick hook with Javascript to redirect the window.location(), however that doesn't work. Obviously the href trumps that. I even considered prefixing the onclick function with a "return" or "exit", trying to half the previous pageload command, but alas, no luck.
With examples, my original link:
[code]<a href="showthread.php?goto=newpost&t=1234">Test ing</a>[/code]
Simple enough, but if I allow a search engine crawler to go there, it'll cause a duplicate page in the SERPs... the same as thread1234.html. I want the crawler to essentially see the link like this:
[code]<a href="thread1234.html">Testing</a>[/code]
But direct the user to the last post of it. Here's my idea that didn't work:
[code]<a href="thread1234.html" onclick="window.location ='showthread.php?goto=newpost&t=1234'">Testing </a>[/code]
Anyone else have any ideas?
Thanks.
