panos_101277
Apr 29, 2008Nimbostratus
Multiple irules using same local variable name
Hello,
First off thanks to all the contributors for their many examples and tips, it has really helped a lot.
My question is a simple one but I haven't been able to find an answer or figure out a way around it.
Is there a way for a variable to be specific to the irule it is created in? Ie can I do this:
irule1:
when HTTP_REQUEST {
set myvar "some value"
}
irule2:
when HTTP REQUEST {
set myvar "another value"
}
Note that these two rules would be attached to the same virtual server. The reason I'm asking is because I've been trying to setup my rules so that they share a lot of common code with local variables to point to different classes to define their behavior. However when I try to use them the local variables in the different irules all have the same value which suffice to say is less than ideal [Tongue]
(I originally posted this under iControl by mistake, since I can't move it I've reposted it here)