In the following example if the http request comes for VIP:192.168.1.1 then the header is checked for cookie name "testcookie" and if the cookie value is "Donot-Redirect" then request is served by serverfarm "APP1-sf" and if this value is not present then request is redirected to http://192.168.120.132/redirect.html .
parameter-map type http APP1-pmap
persistence-rebalance
rserver redirect SERVER-redirect
webhost-redirection http://192.168.120.132/redirect.html 302
inservice
rserver host App1-server1
ip address 10.10.10.111
inservice
rserver host App1-server2
ip address 10.10.10.10
inservice
serverfarm redirect SFARM-redirect
rserver SERVER-redirect
inservice
serverfarm App1-SF
predictor leastconns
probe TCP81
rserver App1-server1
inservice
rserver App1-server2
inservice
class-map match-all App1-VIP
2 match virtual-address 192.168.1.1 tcp eq 80
class-map type http loadbalance match-any APP1-CHECK
match http cookie testcookie cookie-value Donot-Redirect
policy-map type loadbalance first-match APP1-policy
class APP1-CHECK
serverfarm App1-SF
class class-default
serverfarm SFARM-redirect
policy-map multi-match VIPS
class App1-VIP
loadbalance vip inservice
loadbalance policy APP1-policy
loadbalance vip icmp-reply active
appl-parameter http advanced-options APP1-pmap
HTH
Syed Iftekhar Ahmed