Forum Moderators: phranque

Message Too Old, No Replies

Deny from a referer?

block referers from certain site

         

alexandrahan

9:51 am on Jun 13, 2003 (gmt 0)

10+ Year Member



Hello!

Can anyone help me to block visitors coming from certain site? I am now using deny from certain IPs in htacess file, however there are still many unexpected visitors coming in.

Anyone can help me? Thanks!

Lisa

10:09 am on Jun 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, what technology are you using? This is the first step for us handing you the answer. I would use a scripting language for this. Just read the docs on how to get the referer string and away you go.

alexandrahan

12:47 pm on Jun 13, 2003 (gmt 0)

10+ Year Member



Currently, I am using

Order allow,deny
allow from all
deny from 218.242
...

it works, however I would like to deny visitors from certain site, and after searching the in google, I got the following script:

SetEnvIfNoCase Referer "^http://the referer site" BadReferrer
order deny,allow
deny from env=BadReferrer

I am not sure if it works, just testing it now!

However, I would appreciate if anyone can tell me any php script that wuold block the visitor by detecting IE language, say, only those who use english IE will be allowed to open the site.

thanks!