Forum Discussion
Mike_S_59924
Nimbostratus
Apr 14, 2008comparison other than equals
Looks like irules only support equals and not equals. Is there any way to simulate greater than and less than.
The problem.
We have a web site w/ 240 virtual directories. We want...
Mike_S_59924
Nimbostratus
Apr 17, 2008Hi Aaron,
The initial thought was that I would need to get to the 2nd character to equal sized chunks.
I.e if URI was from AA to DL goto pool A, if it was from DM to LI pool B, etc...
So I was not wanting to key of the 2nd character but the first 2. Given the amount of complexity that will add and after further analysys, I am ok with just keying off the first letter based on the distribution of site names.
I am now in syntax hell.
Here is what I have:
when HTTP_REQUEST {
Parse the fist character in the path
switch {[string tolower [string range [HTTP::path]] 2 1] {
a - b - c {pool test1
}
d - e - f - g - h - i - j - k - l {pool test2
}
m - n - o - p - q - r {pool test3
}
s - t - u - v - w - x - y - z {pool test4
}
default {
Requested URI was a leading forward slash only
pool test5
}
}
}
And here is the LTM error message
01070151:3: Rule [test] error:
line 1: [parse error: missing close-brace] [{
Parse the fist character in the path
switch {[string tolower [string range [HTTP::path]] 2 1] {
a - b - c {pool test1
}
d - e - f - g - h - i - j - k - l {pool test2
}
m - n - o - p - q - r {pool test3
}
s - t - u - v - w - x - y - z {pool test4
}
default {
Requested URI was a leading forward slash only
pool test5
}
}
}]
line 3: [command is not valid in the current scope] [switch {[string tolower [string range [HTTP::path]] 2 1] {
a - b - c {pool test1
}
d - e - f - g - h - i - j - k - l {pool test2
}
m - n - o - p - q - r {pool test3
}
s - t - u - v - w - x - y - z {pool test4
}
default {
Requested URI was a leading forward slash only
pool test5
}
}
}]
Thanks again for all the help.
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
