Many Web site managers prefer all site visitors to enter their site through the front page. The front page may contain site usage information that all users should see, or navigation tools that they’ll be lost without. In any case, you can ensure that all visitors go to the front page first by checking the referring page with JavaScript and redirecting if necessary. If the referring URL doesn’t contain your site’s domain name, chances are it came from an outside link. This JavaScript function checks the referring URL for the domain name “razorfish”, and if it doesn’t find it sends the user to the front page of the Razorfish site.
...