Irish SEO,  Marketing & Webmaster Discussion

 

Block useragent with htaccess

This is a discussion on Block useragent with htaccess within the Coding Help forums, part of the Webmaster Help category; I am trying to block this agent with htaccess and need help with the code. so far I have tried ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Calendar Search Today's Posts Mark Forums Read

  #1 (permalink)  
Old 04-01-2009, 12:24 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 189
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default Block useragent with htaccess

I am trying to block this agent with htaccess and need help with the code.
so far I have tried this but its not working ,
Here is the original "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
and this is what I have tried
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4.0\ (compatible;\ MSIE\ 6.0;\ Windows\ NT\ 5.1;\ SV1)*$ [NC,OR]

any help would be appreciated

Last edited by ghost; 04-01-2009 at 12:57 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-01-2009, 01:26 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,204
Nominated 6 Times in 4 Posts
Nominated TOTW/F/M Award(s): 1
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

give this a shot
Code:
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Zeus 
RewriteRule ^.* - [F,L]
the \ back-slashes has been removed by the forum code...
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Car Parts & Accessories Car Parts
:. Cars Ireland Cars Ireland
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 05-01-2009, 12:07 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 189
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default

Thanks for that louie worked fine
background to this was I was receiving a few hundred requests a day from multiple ip s with this usur agent not sure what was going on so I decided to kick them out the requests came every three hours on the half hour .
with in 3 mins of banning this user agent I had over 80 403 , and then 3 requests from different IP s using a similer user agent which I traced back to web sense ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
block, htaccess, useragent

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Which countries would you block? blacknight Forum Management 14 06-02-2009 06:55 PM
Google has block ads faizanno1 Search Engine Optimisation 2 05-11-2008 08:04 PM
New blog on the block Dotwebs Blogs & Blogging 6 08-10-2008 08:06 PM
Useragent in forum post blacknight Forum Management 0 14-09-2008 01:51 AM
Feedburner UserAgent? blacknight Blogs & Blogging 0 18-08-2008 12:55 AM


Sponsored links

Pepperjam Network
Paid On Results www.zanox.com


All times are GMT +1. The time now is 08:49 PM.


Powered by: vBulletin Version 3.8.2, Copyright ©2000 - 2009, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51