Forum Moderators: phranque

Message Too Old, No Replies

Banning FDM 1.x with .htaccess.

Did I do it right?

         

guitaristinus

11:24 am on May 15, 2005 (gmt 0)

10+ Year Member



From my log:
213.121.151.202 - - [13/May/2005:09:10:20 -0400] "GET /directory/page.htm HTTP/1.1" 200 2514 "http://mysite.com/directory/" "FDM 1.x"

I want to ban "FDM 1.x" with .htaccess. This is what I put in the file:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^FDM [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^justanotheragent/ [NC]
RewriteRule .* - [F]

I've noticed that there is also often a "FDM" in the description of the operating system/computer. See example below.

210.56.19.13 - - [14/May/2005:13:26:25 -0400] "GET /directory/page.htm HTTP/1.0" 200 11119 "http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=RNWE,RNWE:2005-12,RNWE:en&q=word1+word2" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM)"

I take it that the FDMs have nothing to do with one another. The above visitor from Google came the day after I added line to .htaccess. I'm glad the person using Google got through OK. The "FDM 1.x" agent didn't come by since line addition, so I don't know if it will get 403'd.

What do you think?

jdMorgan

2:21 pm on May 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since your pattern is anchored, the rule will block only those requests from user-agents starting with "FDM".

Jim

guitaristinus

11:20 pm on May 15, 2005 (gmt 0)

10+ Year Member



Thanks Jim. That's what I want.