+ Reply to Thread
Results 1 to 3 of 3

Thread: Block useragent with htaccess

  1. #1
    ghost's Avatar
    ghost is offline Wannabe Geek ghost will become famous soon enough
    Join Date
    Dec 2007
    Location
    Ennis
    Posts
    196

    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 01:57 PM.

  2. #2
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328

    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

  3. #3
    ghost's Avatar
    ghost is offline Wannabe Geek ghost will become famous soon enough
    Join Date
    Dec 2007
    Location
    Ennis
    Posts
    196

    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 ?

+ Reply to Thread

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

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 52 53 54 55 56 57 58 59 60 61 62 63 64