Forum Moderators: DixonJones
I tried SetEnvIf but that only blocks the User Agent String and does not discriminate via IP.
Basically, what I want to do is:
If {ip="this IP range"} AND {user agent="this user agent string"} then DENY access ELSE ALLOW access.
Thats the simplest way I can explain it, but I cant work out a way to do it using .htaccess.
Im open to other methods if there are any.
cheers and thanks.
RewriteCond %{REMOTE_ADDR} ^64.62.XXX.YYY [OR]
RewriteCond %{REMOTE_ADDR} ^62.62.XXX.ZZZ
RewriteCond %{HTTP_USER_AGENT} "some\ user\ agent"
RewriteRule .* - [F,L]
This reads as: IF you come from EITHER of the ip addresses, AND you're using "some user agent" THEN you can't enter.
;)