Forum Moderators: DixonJones

Message Too Old, No Replies

how do i block a referring site?

         

dankish

12:35 am on Jan 27, 2005 (gmt 0)

10+ Year Member



my guestbook has been getting spammed from a certain site...i was wondering how to block a site from being able to visit my site?

IP deny doesnt cut it with CPanel..

thanks!

HughMungus

12:44 am on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using PHP, ASP, etc?

dankish

12:46 am on Jan 27, 2005 (gmt 0)

10+ Year Member



html,php..

could i just make a robots.txt and put

User-agent: *
Disallow: /guestbook/

the damn company UmaxSearch has been spamming everyday,every hour,for the last 2 weeks..i cant stand this!

HughMungus

1:36 am on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First of all, you can't rag on other websites/companies here.

Second, just put this at the top of your pages:

$referer = $_SERVER[HTTP_REFERER];
if ($refer=="their.ip") Header("Location: [somewhereelse.com");...]

dankish

1:36 am on Jan 27, 2005 (gmt 0)

10+ Year Member



sorry... but thanks!

dankish

1:42 am on Jan 27, 2005 (gmt 0)

10+ Year Member



im confused...
replace their.ip with the ip of the site?
and the .com to the site i want them to be redirected to?