Forum Discussion
ekaleido_26616
Cirrocumulus
Make your data group look like this, maybe? Then you could write a quick API call to add or subtract hosts from the apology page and not have to worry about listing sites you don't want to take any action on/for.
"www.example.com := www.apology.page/example"
when HTTP_REQUEST {
set host [class match -value [string tolower [HTTP::host]] equals dg_apology_single]
if { $host ne "" } {
HTTP::redirect "https://$host"
unset $host
}
}
eirikn
Jul 26, 2016Nimbostratus
Hmm, Im not sure if I follow.
Writing a API to manage the hosts sounds like a bit to much work. Not knowing exactly how to do so.
Having all my sites in the datagroup, predefined with a simple Yes/no value will be easy for others to manage.
If site3 is experiencing problems, one just has to change a no to yes.
I think the hard part is to have a single site redirect to a unique URL, if a "yes" is present.