/ Published in: JavaScript
                    
                                        
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  tag on the page:
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<script type="text/javascript">
var allowed_referrer = "http://www.yourdomain.com/referring_page_name.html";
if(document.referrer.indexOf(allowed_referrer) == -1){
alert("You can access this page only from " + allowed_referrer);
window.location = allowed_referrer;
}
</script>
URL: http://www.apphp.com/index.php?snippet=javascript-specify-referring-page
Comments
 Subscribe to comments
                    Subscribe to comments
                
                