How to redirect a user to the Last Domain Browsed
You need to use Cookie as Sessions will be lost once browser is closed.
You can use hook_init() or hook_boot() or page-front.tpl.php

function hook_init(){
 $domain_last_accessed = $_COOKIE['domain_cookie'];
 if($domain_last_accessed != "" &amp;&amp; $domain_last_accessed != $_SERVER['HTTP_HOST']){
 // Check if cookie is set and previous visited was not this domain then redirect
 // redirect using drupal_goto() or Header()
 }
 else{
 // Check for Cookie and set if empty, this might be the first visit or cookie was destroyed
 // SetCookie with $_SERVER["HTTP_HOST"]
 }
}


If you want it to be machine independent then you may need to store last accessed domain in DB and note that this will only help authenticated users.