Forum Moderators: phranque

Message Too Old, No Replies

Blocking Unwanted Traffic

Cos not all traffic is good!

         

DaveMcF

8:09 pm on Oct 5, 2006 (gmt 0)

10+ Year Member



Hope someone will be able to help!

I'm getting a bit of unwanted attention from traffic exchange programs that I haven't signed up for - and don't want.

They all seem to use runner.php or multisurfbar.php scripts, so I was wondering if this would work in htaccess:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} /scripts/runner\.php [NC]
RewriteCond %{HTTP_REFERER} multisurfbar\.php [NC]
RewriteRule .* - [F]

If not, could some kind soul give me a hand?

Ta,
Dave

jdMorgan

9:28 pm on Oct 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to add a logical OR function between your two RewriteConds. Otherwise, in order for the rule to be applied, they would both have to be true at the same time - which is unlikely.

So, change the flag on the first RewriteCond from [NC] to [NC,OR]

Jim

DaveMcF

11:45 pm on Oct 5, 2006 (gmt 0)

10+ Year Member



Thanks Jim.

I'll give it a shot.