Forum Discussion
Ron_126046
Nimbostratus
Feb 24, 2014Permit specif IPs to pools, all others see simple maintenance page REPOST as requested
I have an irule set up to redirect to specific pools depending on uri. Now maintenance is being done and only specific ips need to be allowed to sites, all other get a simple web page that the site ...
John_Alam_45640
Feb 24, 2014Historic F5 Account
This may be what you are asking for, change data_group_name_here to the real name of the datagroup you created:
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals data_group_name_here] } {
switch -glob [string tolower [HTTP::uri]] {
"/jumper" { pool jumper_JMPRIIS_Https_Pool
log local0. "redirect irule pool jumper_JMPRIIS_Https_Pool" }
"/" - "/annie" - "/bugg" - "/charles" - "/dog" - "/fashion" {
pool fashion_FHSIIS_Https_Pool
log local0. "redirect irule pool fashion_FHSIIS_Https_Pool" }
default { pool skijump_SKJWEB_Https_Pool
log local0. "redirect irule pool skijump_SKJWEB_Https_Pool" }
}
} else {
HTTP::respond 200 content {Maintenance PageSite is down, try again later.}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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