I need to have certain links on my site appear to go one place for search engines:
<a href=“http://example.com” …
but go through an intermediate script to track clicks:
Is there a way you could just
<?php require('track.php'); ?>
from your header in all your webpages and just pass a superglobal to it with your href? Or is that not at all how your tracking script works?
I guess I would need to know how your tracking script works to get an idea of how to approach this.
The ID in “http://example.org/track.php?id=112” is used to look up the href. The script then does a header() redirect to go to that location (in the meantime updating the counter for that href).