Forum Discussion
Chris_R_123579
Nimbostratus
Apr 04, 2013variable getting reset during irule execution
'll try to be as descriptive as I can since I'm not well trained in our F5 load balancers ways. Basically I have an iRule that looks something like this(pseudocode):
when HTTP_REQUEST {
set host_...
nathe
Cirrocumulus
Apr 04, 2013Chris,
I'm far from an expert at variables in iRules so my only suggestion would be creating a global variable, rather than a local variable.
See this article about global variables: https://devcentral.f5.com/tech-tips/articles/irules-101-03-variables.UV2gXzd5g08
So, in your example it would be something like: "set ::host_num=(digit after /serv)" and then referenced thus: "if { $::host_num != 0 }"
Hope this helps,
N
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