Forum Moderators: phranque

Message Too Old, No Replies

Can't figure why condition not blocking agent

         

pjgarrit

11:27 pm on Jan 12, 2007 (gmt 0)

10+ Year Member



I added this condition to my .htaccess list of agents to block. The full name this agent is sending is bot/1.0 (bot; [;...] bot@bot.bot)

RewriteCond %{HTTP_USER_AGENT} ^bot/1.0 [NC,OR]
RewriteRule .* - [F]

This is not blocking this bot or agent.

I've tried the full agent name anchored at both ends and it keeps showing up.

Not sure what this bot is but I don't see how it's doing me any good.

Next step is to block the IP - seems to be coming from the same one all the time - but don't like to unless I have to.

thanks - pj

wilderness

12:49 am on Jan 13, 2007 (gmt 0)

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



IF this is the ONLY rewrite in a single series?

Than the trailing OR that you have will stop the denial.

In addition you need to escape the period after the 1.

IF the ONLY; should read:

RewriteCond %{HTTP_USER_AGENT} ^bot/1\.0 [NC]
RewriteRule .* - [F]

pjgarrit

10:03 am on Jan 13, 2007 (gmt 0)

10+ Year Member



It's not the only condition but part of a long list of blocked agents.

Thanks for the reply