Skip to content
WJunction - Webmaster Forum

Block Referee with html or java NOT HTACCESS

Status
Not open for further replies.
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???
 

1 comment

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.
 
Status
Not open for further replies.

About the author

D
Active Member · Joined
61
Messages
7
Reactions
8
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom