sandiksk
May 08, 2024Nimbostratus
redirect not working
I have below scenario works without redirect if statement . when i add the if statement for uri redirect getting a reset.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/" } {
HTTP::redirect /testpage
}
#log local0. "Active members is [active_members pool1]"
if { [active_members pool1] == 0 }{
if { ( ( [class match [IP::client_addr] eq "whitelist"] ) && ( [active_members pool2 ] > 0 ) ) }
{ pool pool2
}
else {
HTTP::respond 503 content [ifile get "applicationdown.html"]
}
}
}