For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Chaithy's avatar
Chaithy
Icon for Nimbostratus rankNimbostratus
Aug 17, 2017

else not working

when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "Microsoft-Server-ActiveSync" || [string tolower [HTTP::uri]] equals "EWS" } {

sent to default pool
                pool WB_getmail.warnerbros.com_HTTPS            
            }
            else { 
redirect to outlook.office.com
                           HTTP::redirect https://outlook.office.com/owa/warnerbros.com

            }

}

2 Replies

  • Hello Chaithy,

    try the following, It worked for me :

    when HTTP_REQUEST {
    
     if { [string tolower [HTTP::uri]] equals "Microsoft-Server-ActiveSync" || [string tolower [HTTP::uri]] equals "EWS" } {
                    sent to default pool
                    pool WB_getmail.warnerbros.com_HTTPS            
        } else { 
                    redirect to outlook.office.com
                    HTTP::respond 302 noserver "Location" "https://outlook.office.com/owa/warnerbros.com"
    
        }
    }
    

    Please give me a feedback,

    While testing, you can check if any error is occuring in real time using

    tailf /var/log/ltm

    Share if something relevant hapens

    Hope it helps,

    Regards

  • Hi,

    This Irule can't work for active sync and EWS... uri always starts with /, string tolower convert the uri to lowercase and is compared with uppercase strings..

     when HTTP_REQUEST {
    
     if { [HTTP::path] equals "/Microsoft-Server-ActiveSync" ||  [HTTP::path] starts_with "/EWS" } {
                    sent to default pool
                    pool WB_getmail.warnerbros.com_HTTPS            
        } else { 
                    redirect to outlook.office.com
                    HTTP::respond 302 noserver "Location" "https://outlook.office.com/owa/warnerbros.com"
    
        }
    }