Support » Plugin: WP BrowserUpdate » Block Old Browsers

  • Resolved martychc23

    (@martychc23)


    Hi, as a security measure, would it be possible to block (return 403) for very old browsers that humans are unlikely to be using? This would be a good way to stop bad bots.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marco Steinbrecher

    (@macsteini)

    Could do. However, I recommend putting a rule into your .htaccess file.

    Hi,

    Good idea.

    Cheers,
    Bill

    • This reply was modified 1 year, 1 month ago by sminozzi.

    @macsteini for those without the technical know how to do this. Is there anything you could suggests?

    Plugin Author Marco Steinbrecher

    (@macsteini)

    Have a look at this: http://perishablepress.com/6g

    I am aware of the 6G firewall, but from my understanding it doesn’t block old browsers.

    I have found this code which i modified slightly.

    What do you think of this, does it look ok?

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    ##### Really Old Web Browser
    RewriteCond %{HTTP_USER_AGENT} ^.*Mozilla\/[1-4]\\.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^.*Chrome\/[1-9]\\.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^.*Firefox\/[1-9]\\.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^.*MSIE\s[1-6]\\.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^.*Opera* [NC]
    
    ##### Fake Mozilla USER_AGENT Missing "/[1-9][0-9.][0-9.]
    RewriteCond %{HTTP_USER_AGENT} ^.*Mozilla* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*Mozilla\/[1-9][0-9.][0-9.]* [NC]
    
    ##### Fake Chrome USER_AGENT Missing "/[1-9][0-9.][0-9.]
    RewriteCond %{HTTP_USER_AGENT} ^.*Chrome* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*Chrome\/[1-9][0-9.][0-9.]* [NC]
    
    ##### Fake Firefox USER_AGENT Missing "/[1-9][0-9.][0-9.]
    RewriteCond %{HTTP_USER_AGENT} ^.*Firefox* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*Firefox\/[1-9][0-9.][0-9.]* [NC]
    
    ##### Fake Internet Explorer USER_AGENT
    ###MSIE Has a Different Format Than Other Browsers Eg. "MSIE VERSION"
    RewriteCond %{HTTP_USER_AGENT} ^.*MSIE* [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*MSIE\s[1-9][0-9.][0-9.]* [NC]
    
    RewriteRule .* - [F,L]
    
    </IfModule>
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Block Old Browsers’ is closed to new replies.