cancel
Showing results for 
Search instead for 
Did you mean: 

Irule to redirecting to pool based on User-Agent

Sarovani
Cirrostratus
Cirrostratus

Hi Team ,

 

We have a 443 VIP with default pool configured to it , We have a new requirement to create a new pool and redirect the traffic to the new pool based on the user-agent .

 

VIP : vs_example_443

Default Pool : p_example_80

 

New Pool : p_example_useragent_80

 

So if the http header contains user agent "example useragent 2.1" the traffic should be forwarded to pool p_example_useragent_80 else to the default pool p_example_80 ?

 

Can you please help me with the irule for this .

 

2 REPLIES 2

Hi ck_Bengre,

when HTTP_REQUEST { if { [HTTP::header User-Agent] contains "example useragent 2.1" } { pool p_example_useragent_80 } else { pool p_example_80 } }

 

Thank you @Enes Afsin Al​