Forum Discussion
Naman_65674
Oct 20, 2011Nimbostratus
Best Practice: Regex vs number of if/else
Hi, I previously had a rule that had: if { $login == 1 && ([string first "OP=help" [HTTP::header "location"]] == -1) && ([string first "OP=token_lo...
Michael_Yates
Nov 02, 2011Nimbostratus
Hi Naman,
To add a little bit more to what you posted about the variables. On the CMP compatibility page it says:
Global Variables
9.4.x global variables not compatible with CMP Note - demoted only if caught by validator--"global" keyword was not caught by validator (:: reference)
Not CMP compatible:
set val "$::www_redir https://${host}:${port}[HTTP::uri]\r\n$::www_opts"
CMP compatible (v9.x):
set val "[findclass "www_redir" global_vars " "] https://${host}:${port}[HTTP::uri]\r\n[findclass "www_opts" global_vars " "]"
So the "$::" and "::" variable designation will still "work", but it makes the iRule CMP Non-Compliant. The impact of that would tie all traffic to the default TMM0 when processing this iRule in a CMP environment.
Best practices are to remove it, but when you upgrade to 10.x.x, stop using the "classmatch" command all together and more to the "class match" command instead.
Hope this helps.
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