penders - 9:23 pm on Jul 1, 2011 (gmt 0)
So you have anchors like this...?
I would have thought returning a 301 status code in your script (as indicated) should prevent these URLs being indexed. However, I think external-site.com will then get indexed. (?)
You could also place a rel="nofollow" in these anchors to prevent pagerank from being passed. Is rel="noindex" supported by search engines on anchors?