Forum Discussion

Enrique_Ramirez's avatar
Enrique_Ramirez
Icon for Nimbostratus rankNimbostratus
Apr 21, 2014

iRule to block VIP from being access from Firefox/Chrome

Hi, I have an app behind a VIP that doesn´t behave well under Firefox and Chrome, do you know how can I block access from those two browsers using an iRule? Thanks.  
  • kj07208_118528's avatar
    Apr 21, 2014

    Here's a psedo irule also you can look up user agents here http://user-agent-string.info/ https://devcentral.f5.com/wiki/iRules.HTTP__redirect.ashx

        when HTTP_REQUEST {
        for debugging
          log local0. ".......[HTTP::header User-Agent]"
    
          if { [HTTP::header User-Agent] contains "some string from user agent" } {
          log local0. ".......Header does contain info *****************************"
           Do a redirect to certain page
    HTTP::redirect "http://www.example.com/newlocation.html"
          }
        }