Forum Discussion
James_Ramsey_10
Nimbostratus
May 31, 2007maintenance
I would like to setup an rule to send all traffic to http://maintenance.mysite.com from a virtual server when all 6 pools are down. Could anyone help me out?
Thanks
Jun 01, 2007
It's your lucky day, I think the domain command is just what you need!
http://devcentral.f5.com/wiki/default.aspx/iRules/domain.html
Click hereGive this a shot...
when HTTP_REQUEST {
if { 0 == [active_members [LB::server pool]] } {
set dom [domain [HTTP::host] 2]
HTTP::redirect "http://maintenance.${dom}"
}
}Or, without the local variable
when HTTP_REQUEST {
if { 0 == [active_members [LB::server pool]] } {
HTTP::redirect "http://maintenance.[domain [HTTP::host] 2]"
}
}-Joe
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