eirikn
Mar 15, 2016Nimbostratus
Individual Apology page with DataGroup
Hey,
I'm trying to present many different apology pages based on the incoming host header.
I have about 100 different hosts, and all hosts would need a different 301 redirect if the pool is unavailable.
I'm having some problems with my irule:
when HTTP_REQUEST {
set artifactid [class match -value [string tolower [HTTP::host]] contains my_apology_dg ]
if {( $artifactid ne "") and ([active_members my_web_pool] < 1) }{
HTTP::redirect $artifactid
event disable
}
}
Here is my DG:
ltm data-group internal /DMZ/my_apology_dg {
records {
mysite {
data https://www.myapologyurl.com
}
}
type string
}
Requets to: https://mysite.com should redirect to https://www.myapologyurl.com when all members of my_web_pool is offline.
I will add many more sites to the datagroup once i get the logic working.
Any input would be much appreciated.