Forum Discussion

Luis_Pichoasami's avatar
Luis_Pichoasami
Icon for Nimbostratus rankNimbostratus
Jan 13, 2014

IRULE for redirect traffic for type of browser

Hi,

 

I have an application that is ok only with Mozilla Firefox. I need a irule that controls whether the type of browser used is Mozilla continue the application normally and if the browser is not mozilla displays an error message browser compatibility or redirected to a page where a message is displayed.

 

Please your help.

 

2 Replies

  • Hi Luis,

    Here you go:

    when HTTP_REQUEST {
    
         Check user agent strings: http://www.useragentstring.com/pages/Firefox/
        switch -glob [string tolower [HTTP::header User-Agent]] {
            "*firefox*" {
                 do nothing and allow request to go to the VS pool
            }
            default {
                HTTP::redirect "https://usefirefox.example.com/index.html"
            }
        }
    }
    

    Aaron