Forum Moderators: phranque

Message Too Old, No Replies

htaccess not working as expected.

         

bhuether

2:45 am on Mar 15, 2008 (gmt 0)

10+ Year Member



I am trying to restrict annoying bots from accessing my site. I have this in htaccess:

RewriteCond %{HTTP_USER_AGENT} Yandex* [OR]
RewriteCond %{HTTP_USER_AGENT} Twiceler*
RewriteRule ^.* - [F,L]

Yet in my current access log I see MANY entries like

77.88.26.26 - - [14/Mar/2008:19:39:04 -0700] "GET /guitarlessonsforum-viewforum-f-10-sid-284247e6d6391043613530f382bccabb.html HTTP/1.1" 403 586 "-" "Yandex/1.01.001 (compatible; Win16; I)"

How can this be?

thanks,

brian

bhuether

2:49 am on Mar 15, 2008 (gmt 0)

10+ Year Member



Wait - I just noticed that these entries indicate the 403 code... So I guess it is working as it should!

Thanks,

brian

mikesz

10:05 am on Mar 16, 2008 (gmt 0)

10+ Year Member



If you check your error log, you should also see a "client denied by server configuration:" for that request as well. FYI

hth,

regards, mikesz