Joseph_Goyette_
Mar 16, 2005Nimbostratus
matchclass and syntax errors
I've got a simle iRule below based on the example in the Writing iRules section of the LTM guide.
In a nutshell, I am attempting to direct requests to specific urls based on the client's ip address. I've copied the matchclass syntax directly from the manual yet I keep getting a syntax error:
Line 10: [parse error: PARSE syntax 264 {syntax error in expression "[IP::remote_addr] eq matchclass Esc-External-Networks ": variable references require preceding $}] [{[IP::remote_addr] eq matchclass Esc-External-Networks }]
Substituting the generic "aol" data group name produces the same error.
when HTTP_REQUEST
{
if {[HTTP::uri] starts_with "/all/"} {
use pool ALL-POOL
}
elseif {[HTTP::uri] starts_with "/CustomerA/"} {
use pool POOL-A
}
elseif {[HTTP::uri] starts_with "/CustomerB/"} {
if {[IP::remote_addr] eq matchclass Esc-External-Networks } {
use pool POOL-B
} else {
HTTP::redirect "http://www.escription.com/"
}
}
}
What am I missing here ?
Thanks !
Joe