Tom_Lauwereins_
Jun 15, 2011Nimbostratus
Redirect based on URI
Hi,
I try to implement a simple iRule.
Based on URI, traffic has to be redirected to different pools.
when HTTP_REQUEST {
if {[matchclass [HTTP::uri] starts_with "/ws/"]}{
log local0. "1. Client [IP::client_addr]: client requested [HTTP::host][HTTP::uri]"
pool pool_A
}
else {
log local0. "2. Client [IP::client_addr]: client requested [HTTP::host][HTTP::uri]"
pool pool_B
}
}
But I get the error:
- Invalid matchclass operands - no class or list type found, lhs: string, rhs: /ws/ (line 1) invoked from within "matchclass [HTTP::uri] starts_with "/ws/""
Any suggestions?
Tom