iRule to match multiple conditions
Hello,
We are in the process of setting 2 factor for OWA only if the users are coming in from the Internet. When a user comes in from the internet and hits the page "https://webmail.company.com/owa" they should get redirected to a pool which has the servers configured for 2 factor. Any other URLS should be redirected to the pool that does not have 2 factor configured.
The rule I was working on would have a logic like this.
when HTTP_REQUEST { if { ([HTTP::uri] contains "/owa/") && not ([[class match [IP::client_addr] equals OWA-NO-2FA]]) } { pool OWA_2FA_Pool } else { pool OWA_SSL_POOL } }
If URI starts with /OWA/ and Source IP does not match datagroup (Internal networks) pool OWA-2FA-Pool
All other URL's ( eg /rpc/ ) should be sent to the default pool assigned to the VIP.
This rule would follow the http-https /owa redirect rule.
Any help would be appreciated.
thanks,
karthik