Forum Discussion
Anthony_178254
Nimbostratus
Nov 02, 2016Complex logic -- Redirect to new URI based on IP in Data Group match.
Hi All, Need help from the many iRule expert here. I have an iRule that currently validate server availability and send to a maintenance page and also have a rule to match based on URI access. ...
Samir_Jha_52506
Noctilucent
Nov 03, 2016Prepared iRule based on the condition. Please let me know if working.
when HTTP_REQUEST {
if { [active_members MYPOOL-MYSITE-P443] < 1 } {
HTTP::redirect "http://maintenance.mysite.com" }
switch -glob [HTTP::uri] {
"*/admin1*" -
"*/admin2*" {
if { !([matchclass [IP::client_addr] equals ADMIN-ALLLOWED-IP-LIST])} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]" }
else { HTTP::redirect "/CustomerInternal" }
}
}
}
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