Forum Discussion
The_Bhattman
Sep 28, 2009Nimbostratus
Hi DM,
The following example is v9 iRule of something that may be close what you are looking for:
when HTTP_REQUEST {
if {[HTTP::uri] eq "/blah" } {
HTTP::header insert "ClientIPAddress" [IP::client_addr]
pool poolA
} elseif{ [HTTP::uri] eq "/blahblah" } {
persist cookie insert "Blah_poolb_Cookie" "0d 00:30:00"
pool poolB
}
}
or via the SWITCH command
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/blah" {
HTTP::header insert "ClientIPAddress" [IP::client_addr]
pool poolA
}
"/blahBlah" {
persist cookie insert "Blah_poolb_Cookie" "0d 00:30:00"
pool poolB
}
}
}
I hope this helps
CB