cancel
Showing results for 
Search instead for 
Did you mean: 

iRule to append http profile and persistence based on header

MC77
Nimbostratus
Nimbostratus

I have a VIP that I can't append a HTTP profile to, but need to check a host header and apply persistence to it. Is there an iRule that I can append to this VIP to assist? I'm running 12.1.1

1 REPLY 1

Hello MC77.

 

A Virtual Server interprets protocol stacks base on what profiles you assign to it.

 

If you configure a Standard VS with only tcp profile, that means that only protocols until transport (TCP) stack are going to be parsed.

 

If you include also a HTTP profile, that means that HTTP protocol will be also parsed (http methods, http uri, http headers,...).

 

You cannot assign a http profile base on headers easyly, because the http headers are parsed only when you assign a http profile to the VS.

 

One idea which comes to my mind is to use 'virtual' command inside of an iRule to redirect queries from one VS to another VS.

This is call 'VIP-Tarjeting-VIP'.

REF - https://clouddocs.f5.com/api/irules/virtual.html

 

Maybe, clarifying what are your final goals we could give a different and easier approach. Why to modify http profile base on header?

 

KR,

Dario.

Regards,
Dario.