Forum Discussion
Jeremy_Brainerd
Nimbostratus
Mar 22, 2017Using iRule to redirect F5 traffic based on Maintenance.
I would like to know how to redirect F5 traffic using a iRule when the main URL site displays an specific keyword on the main web page (example: "Maintenance"). Keep in mind that the pool members wil...
Samir_Jha_52506
Noctilucent
Mar 22, 2017Tried to write iRule based on the question. Let us know if any question.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::redirect "http://www.google.com" }
}
when HTTP_REQUEST_DATA {
Define a string-type datagroup called dg_blocked containing words to be "Maintenance"
if { [matchclass [HTTP::payload] contains dg_blocked] }{
HTTP::respond 302 Location "https://www.google.com" }
}
For general payload examination, payload collection is limited by memory allocation constraints to a 32MB maximum.
Samir_Jha_52506
Noctilucent
Mar 23, 2017Can't grep maintenance keywords from different vip's URL.
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