Forum Discussion

phipse's avatar
phipse
Icon for Altostratus rankAltostratus
Apr 16, 2018

HTTPS redirect to different pools

Hi Guys,

 

I'm trying to use an iRule to redirect traffic based on the URL. Let me give you the example:

 

The Virtual server is on port 443, but the pools are on 8443 and 9443.

 

https://10.10.10.10/blue goto pool_b

 

goto pool_r

 

 

The default pool in the virtual server is pool_b_8443. Traffic gets to there no problem.

 

However, I can not seem to get this iRule to work.

 

I'm not an expert with BIG IP LTM so please go easy on me :-)

 

Thank you

 

Euan

 

2 Replies

  • Did you configure Client profile for SSL offloading in Virtual server ? SSL decryption has to be configured for HTTP traffic inspection and therefore irules manipulations.

     

  • Your switch statement doesn't look right. Try this:

    when HTTP_REQUEST {
        switch -glob [HTTP::uri] {
            "/blue*" {
                pool pool_b_8443
                persist ssl
            }
            "/red*" {
                pool pool_r_9443
                persist ssl
            }
        }
    }