Click to See Complete Forum and Search --> : How To Block Referred Visitors


amberlynn
03-14-2003, 04:18 PM
does anyone know how to put something into your index page, that will block referral sites? Say.. if someone clicked on a link to my site from http://asdfsite.com, they wouldn't be able to access it?

requestcode
03-19-2003, 07:33 AM
You could check document.referrer to see where they came from. Something like this:
<script language="javascript">
if(document.referrer=="http://www.somsite.com")
{history.go(-1)}
</script>

You will have to get the exact syntax of the url for it to work. Place this at the very top of your document.