if you're using HTML hahahahahaha refresh> tags, you'll have to invent some hahahahahahahahahaha-fu to tack the referring url on to new URL. If you're using PHP, something like:
<?
header("Location:
http://www.site.com/?ref=".$_SERVER['HTTP_REFERER'].">";
?>
Then make your script smart enough to use $ref for the referring, instead of referencing the $_SERVER superglobal.