Forum Discussion
Ranvir_Floura_7
Nimbostratus
Sep 22, 2007Redirect during web site maintenance
Here is the scenario that I need some help with. I have a web site (https://my.web.com)that undergoes maintenance once a month and during that maintenance window, i would like regular users to go to ...
lori_54451
Nimbostratus
Sep 22, 2007Here is our irule. We have the same issue, we want certain users to be able to access the site to test while everone else is sent to maintenance page, this irule checks for certian ip addresses and sends them to the site, everyone else, gets send to the maintenancne page. Hope you can use it.
when HTTP_REQUEST {
if { [IP::client_addr] starts_with "10." } {
if { [HTTP::uri] eq "/" and [HTTP::host] eq "your.url.com" } {
HTTP::redirect "http://your.url.com/wps/portal"
} elseif { [HTTP::uri] eq "/" and [HTTP::host] eq "your.url.com" } {
HTTP::redirect "https://your.url.com/wps/portal"
} else {
if { [IP::client_addr] eq "10.0.16.170" } {
use pool NG-loadtest1-pool
} elseif { [IP::client_addr] eq "10.0.16.175" } {
use pool NG-loadtest2-pool
} elseif { [IP::client_addr] eq "10.0.16.240" } {
use pool NG-loadtest3-pool
} else {
persist source_addr 255.255.255.255 1800
use pool new-fsc-pool
}
}
} else {
use pool nextgen-down
}
}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