make changes on this script and customize it for your use..
<?PHP
// register redirection here
if ($url==""){
print "Hups!";
exit();
}
header("location:".$url);
?>
then simply call this script as
<a href="script_name.php?url=<?=urlencode($url_to_redirect)?>"><?=$url_toredirect?></a>
that would solve your problem..