I wrote this script so people cant return via bookmarks without entering the main page.
PHP Code:
<?php
$to='http://www.mydomain.com';
$ref = $_SERVER['HTTP_REFERER'];
if (($ref !="http://www.mydomain.com")or($ref !="http://mydomain.com")) {
header('Location: '.$to);
}
?>