Forum Discussion
pt_73812
Nimbostratus
Jan 26, 2010dash in URI breaking pool selection?
Hello all,
I've run into a problem with an irule I'm working on. Basically, if there is a dash in the uri, the rule does not seem to pick it up correctly unless there's a trail...
Hamish
Cirrocumulus
Jan 27, 2010Perhaps another answer would be to always decode URI's before checking them against fixed strings, where encodable characters are in the fixed string?
e.g. (Quick hack, you can do better)
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
pool unix_servers
} elseif { [string tolower [decode_uri [HTTP::uri]]] starts_with "/tv/my-link" } {
pool windows_servers
} elseif { [string tolower [decode_uri[HTTP::uri]]] starts_with "/tv" } {
pool unix_servers
} else {
pool windows_servers
}
}
Edit:
Note that decode_uri is a v4 function. v9 and above should use URI::decode
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
