Forum Moderators: phranque

Message Too Old, No Replies

RewriteCond format

for undesirable referer strings

         

stefan009

7:51 am on Sep 5, 2005 (gmt 0)

10+ Year Member



RewriteCond %{HTTP_REFERER} (string1¦string2) [NC,OR]

Where a referer contains either "string1" or "string2" anywhere in the line - will the above exclude it from my site?

Thanks you.

cws3di

8:27 am on Sep 5, 2005 (gmt 0)

10+ Year Member



I'm not too sure of that either/or situation.

I would use two lines, like this:

RewriteCond %{HTTP_REFERER} string1 [NC]
RewriteCond %{HTTP_REFERER} string2 [NC]

jd01

8:32 am on Sep 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it will, and it is actually faster to run than two separate rules.

Justin

stefan009

2:57 pm on Sep 8, 2005 (gmt 0)

10+ Year Member



Thank you very much, I've put that in.

Someone who knows the referrer logs are kept was putting upsetting words alongside an anonymous proxy. ;-)

I'll "upset" him if I get my hands on him..

Stef.