Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

VishnuGatla's avatar
VishnuGatla
Icon for Cumulonimbus rankCumulonimbus
Jul 11, 2017

Irule message show

Hi DC,

 

Is that possible to show the msg whoever coming from different URLs.

 

For example if anybody is coming from

 

https://dell.abc.com/hr-form/registration

 

https://dell.abc.com/hr-form/rest

 

 

they need to see msg as this website will not work for mobile browser and please login through desktop

 

Is that possible to make it in irule ?

 

Please suggest me ?

 

5 Replies

  • Yeah, we can make iRule to match phone browser's

    User-Agent
    header & display message or redirect to webpage.

    Example

        when HTTP_REQUEST {
        switch -glob [string tolower [HTTP::header User-Agent]] {
            "*iphone*" -
            "*android*" -
            "*windows phone*" -
            "*windows ce*" -
            "*bada*" -
            "*bb10*" -
            "*blackberry*" -
            "*symbinos*" -
            "*symbain os*" -
            "*symbian*" -
            "*java*" -
            "*winowsphone*" -
            "*windowsce*" {
                    HTTP::redirect "https://[HTTP::host]mobile.aspx"
                   }
                default { 
        HTTP::redirect "https://[HTTP::host][HTTP::uri]" }
        }
    }
    
    • VishnuGatla's avatar
      VishnuGatla
      Icon for Cumulonimbus rankCumulonimbus

      if { [HTTP::uri] contains "/resignation" "/exit-interview" "/benefit-change" "/personal-info-change" "/verify-coc" "/workers-comp" "/verify-coc" "/verify-electronic-disclosure"} {

       

      HTTP::respond 200 content {This task is not available on the mobile app. Log onto your desktop to complete this task} return }

       

      Is this correct ?

       

      Do I need to add anything..?

       

    • Samir_Jha_52506's avatar
      Samir_Jha_52506
      Icon for Noctilucent rankNoctilucent

      Try switch condition in iRule. Example.

      switch -glob [string tolower [HTTP::uri]]

      And add HTML syntax.

          HTTP::respond 200 content { "Mobile PageSorry! This task is not available on the mobile app. Log onto your desktop to complete this task..."}