session id's should automatically be stripped from inside a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=
tags on a page so it will not be passed to remote sites.
otherwise you can try to setup a page like exit.php?url=http://....
and in exit have
<?php
header("Location: " . $_GET['url']);
?>