D djflakf1 Active Member 60 2012 6 30 Mar 6, 2013 #1 Guys i want to know that is posible block a referee ( a site ) for enter to my site with html or java without use htacess is posible???
Guys i want to know that is posible block a referee ( a site ) for enter to my site with html or java without use htacess is posible???
H himal Active Member 54 2012 13 390 Mar 6, 2013 #2 You can try something like, Code: var block = ['url1', 'url2']; for (var b = block.length; b--;) { if (document.referrer.match(block[b])) window.location = "http://google.com/"; } Source Note that they can still visit your site by disabling the JS support of their browsers.
You can try something like, Code: var block = ['url1', 'url2']; for (var b = block.length; b--;) { if (document.referrer.match(block[b])) window.location = "http://google.com/"; } Source Note that they can still visit your site by disabling the JS support of their browsers.