Forum Discussion
eirikn
Nimbostratus
Jul 26, 2016Can anyone help me with single apology page using data groups?
Hi,
I have a VS that serves several sites. Some times, one of these sites malfunction and I want to be able to manually put it in apology in a easy way.
Im thinking a datagroup with a string and...
ekaleido
Cirrus
Jul 26, 2016Make 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
}
}
ekaleido
Cirrus
Jul 26, 2016I don't like the way this plays out in a large environment, but if this is how you want to do it... Also if you want to append something relevant to site3 aspart of the URI in the redirect, it'll take a bit more work.
www.site3.com := yes
when HTTP_REQUEST {
set host [class match -value [string tolower [HTTP::host]] equals dg_apology_single]
if { $host eq "yes" } {
HTTP::redirect "https://apology.page"
unset $host
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects