Forum Moderators: phranque

Message Too Old, No Replies

Referer IF IP

         

wilderness

3:11 am on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm hoping for some sound direction :)

IF user agent contains? (I'm hoping to uses the OR pipline)
AND
IP is from? (Also hoping to be able to use many IP ranges)

Is it possible?

RewriteCond %{HTTP_USER_AGENT} (squat¦bud¦other¦names)
RewriteCond %{REMOTE_ADDR} ^123\.86\.[0-3]\. [OR]
RewriteCond %{REMOTE_ADDR} ^123\.94\.[0-3]\.
RewriteRule .* - [F]

Thanks in advance

Don

jdMorgan

4:35 pm on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You want to forbid access if the user-agent is one of several user-agents, but only if it comes from one of several IP addresses? In other words (ua1 OR ua2) AND (ip1 OR ip2)?

If so, what you have should work. You can try changing your user-agent to a 'bad' one and testing with your own IP address to be sure.

Jim