Return to Snippet

Revision: 62644
at March 4, 2013 20:17 by apphp-snippets

Initial Code
<script type="text/javascript">
   var allowed_referrer = ""; 
   if(document.referrer.indexOf(allowed_referrer) == -1){
      alert("You can access this page only from " + allowed_referrer);
      window.location = allowed_referrer;

Initial URL

Initial Description
This script informs your visitor that a given page may be reached only from the page that you specify. Paste this code before the ending <head> tag on the page:

Initial Title
Specify Referring Page in JavaScript

Initial Tags
javascript, page

Initial Language