try this:
when RULE_INIT {
set static::sorry_pool "/Common/pool_wwbtest_sorry"
set static::wartung_pool "/Common/pool_wwbtest_wartung"
}
when HTTP_REQUEST {
log local0. "Incoming URI = [HTTP::uri]"
if { [active_members [LB::server pool]] < 1 } {
if { [active_members $static::wartung_pool] > 0 } {
pool wartung_pool
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/wartung.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
} elseif { [active_members $static::sorry_pool] > 0 } {
pool sorry_pool
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/sorry.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
} else {
HTTP::respond 200 content "Lieber Kunde,\r\ndie Seite befindet sich aktuell in der Wartung.\r\n\r\nDear Customer,\r\nthis site is down for maintenance. We are sorry for the inconvience.\r\n" noserver connection close
}
}
}