Forum Discussion
nitass
Apr 23, 2014Employee
GET /us/resource/images/logo.gif shouldn't work, it's not being redirected to the QA-PH pool. /images/logo.gif is the right path but /us/resource/ is the original source.
why is the path not correct? isn't it (maintenance html page) generated by GET / to pool QA-PH?
anyway, if you want to remove /us/resource/ in request for css and image file, you can use string map command similar to this.
e.g.
when HTTP_REQUEST {
if { [active_members INF-HC-HTTP] < 1 } {
if { $static::DEBUG } { log local0. "Primary pool offline" }
switch -glob [string tolower [HTTP::path]] {
"*css" -
"*jpg" -
"*gif" -
"*png" {
HTTP::uri [string map {/us/resource/ /} [HTTP::uri]]
}
default {
HTTP::uri /
}
}
pool QA-PH
} elseif { [class match [string tolower [HTTP::uri]] starts_with QA-HC-URI] } {
pool INF-HC-HTTPDNN
} else {
pool INF-HC-HTTP
}
}