Forum Discussion

Blogger11_11505's avatar
Blogger11_11505
Icon for Nimbostratus rankNimbostratus
Jan 09, 2013

Need an iRule to enable sticky sessions for certain url

I have the following url which is my virtual server. wservicecrt.cerner.com. I need to enable sticky sessions for any requests that go to wservicecrt.cerner.com/bpc*

 

 

All other requests that go to wservicecrt.cerner.com* need to just stay on the default config/normal load balancing that I have set up in the F5.

 

 

I am very new to iRules so I am completly unsure where to start with this.

 

 

Advice/help please?

 

 

Thanks

 

1 Reply

  • Hi,

    Can you try this?

    
     persist: https://devcentral.f5.com/wiki/iRules.persist.ashx
    when HTTP_REQUEST {
         Check the requested path
        switch -glob [HTTP::path] {
            "/bpc*" {
                persist source_addr
            }
            default {
                persist none 
            }
        }
    }
    

    Aaron