Solved
Forum Discussion
ekaleido
Cirrus
Try unsetting your variables at the end of the iRule? Specifically...
unset $newSubdomain
ekaleido
Sep 13, 2016Cirrus
Using the following modifications? What is being logged?
when HTTP_REQUEST {
log local0. "-------------------------------------------------------------"
log local0. "Path [HTTP::path]"
if { not ([HTTP::path] starts_with "/api/") } { return }
set apiType [lindex [split [HTTP::path] "/"] 2]
log local0. "api type $apiType"
append newSubdomain $apiType .uat.
log local0. "New Subdomain $newSubdomain"
HTTP::header replace "Host" [string map [list "api-uat." $newSubdomain ] [HTTP::host]]
log local0. "-------True"
HTTP::path [string map [list "/api/$apiType" "/api"] [HTTP::path]]
log local0. "New Path [HTTP::host][HTTP::path]"
unset $newSubdomain
}