Hi
Hi
I written a rule that checks if members of a pool are down, and if so direct to a pool with a server that is hosting a holding page.
If not, and the members are up, it goes to the original pool. This has worked in testing:
when HTTP_REQUEST {
if {[active_members POOL_LIVEPOOL] == 0} {
pool HOLDING_POOL
} else {
pool POOL_LIVEPOOL }
}
However I found that if the members are down and someone doesn’t just request the main page, but puts a pth on the end, then we get a 404 from the server with the holding page. I need to strip the path off the end of any request so tht all requests are delivered to the holding pool as a root request.
I have tried to do a string map from another irule where this works but it doesn’t work here.
when HTTP_REQUEST {
if {[active_members POOL_LIVEPOOL] == 0} {
HTTP::path [string map { /* / } [HTTP::path]]
pool HOLDING_POOL
} else {
pool POOL_LIVEPOOL }
}
Can anyone give me a pointer as to what I should do to strip the path from a request when the “if” condition is met??
Many thanks
DJC