Forum Discussion
Stanislas_Piro2
Sep 04, 2018Cumulonimbus
try this for logging (irule from Lee with logging request not matching any of 2 conditions)
when HTTP_REQUEST {
if {[HTTP::host] equals "intfilings.abc.gov"} {
if {[HTTP::uri] starts_with "/navigator_icm"} {
log local0. "replacing host header with : server1.ct.gov on URI: [HTTP::uri]"
HTTP::header replace Host "server1.ct.gov"
} elseif {[HTTP::uri] starts_with "/EFilingWeb"} {
log local0. "replacing host header with : server2.ct.gov on URI: [HTTP::uri]"
HTTP::header replace Host "server2.ct.gov"
} else {
log local0. "Unchanged host header on URI: [HTTP::uri]"
}
}
}