Forum Discussion
Jim_Raleigh
Nimbostratus
Feb 01, 2018Converting iRule from v9 to v12
In the process of migrating from v9.4.7 to v12.1.1 and am having issues with iRules... In the following I am pulling string Data Groups for B2B_Blocked_URLS and B2B_URLS... Could you assist on how I ...
Lee_Sutcliffe
Nacreous
Feb 01, 2018Hi Jim,
You can try the following, please be advised you can now achieve the same results using a Traffic Policy (configured in the GUI). Code that is no longer supported are variables declared in the global namespace ($::var) these will demote your CMP so the iRule will only run on one CPU. Also matchclass has been deprecated
when RULE_INIT {
set static::DEFAULT_URI "/b2b/init.do"
}
when HTTP_REQUEST {
if {[class match [HTTP::uri] contains B2B_Blocked_URLS] } {
HTTP::redirect $static::DEFAULT_URI
} elseif { not ([class match [HTTP::uri] contains B2B_URLS]) } {
log local0.crit [HTTP::uri]
HTTP::redirect $static::DEFAULT_URI
}
}
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
