Link to home
Start Free TrialLog in
Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on

Using Htacces to block a link

Hi

One of my clients is getting a lot (thousands) of one specific incoming link going to his site, resulting in  404 errors -- increasing CPU etc.

The incoming link is (slightly modified for security) is news/blah.php

Can I use a version of the following code to "block" that incoming link.  (We will be doing other things to deal with this issue --  but also would like to block it, if possible, via htaccess.)

Webserver:         Apache
php based on Linux

SetEnvIfNoCase Referer thebadsiteurl.com spammer=yes
Order allow,deny
allow from all
deny from env=spammer

Open in new window


Thanks,

Rowby
SetEnvIfNoCase Referer thebadsiteurl.com spammer=yes
Order allow,deny
allow from all
deny from env=spammer

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of madunix
madunix

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rowby Goren

ASKER

Thanks, madunix~


That fixed it for me!

Rowby