Click to See Complete Forum and Search --> : protect pages


tane
03-05-2003, 05:16 AM
looking for a script that i can use to protect my content pages for example only letting entry to my content page's if the referrer url the are coming from is one of my url's....so my content page cannot be bookmarked or linked too...if they do not come from one of my content page the script redirects them to another page of my choice..

gil davis
03-05-2003, 06:26 AM
The easiest way would be:<script>
if(document.referrer.indexOf("www.yourdomain.com") == -1) window.location.href = "index.htm";
</script>Change the URLs as necessary. Put the script in the HEAD section of your pages.