Forum Discussion
Jack_Huang_5191
Nimbostratus
Jul 15, 2005When v4.5.10 irule code migrate to v9.1, it can't work.
I have a right v4.5.10 irule script. It works well in the big-ip 4.5.10. The function of this script is to traffic http uri contains .sdp, 3gp, mov, mp4 to a pool, sun_stream_servers. Other http uri t...
Jul 15, 2005
matches_regex is too much overhead. You should probably just use the contains rational operator. You can also chain the conditions up with OR's. I've thrown in some logging that you can remove if things are working for you. Check in the /var/log/ltm file for the output.
when HTTP_REQUEST {
log local0. "found uri: [HTTP::uri]"
if { [HTTP::uri] contains ".sdp" ||
[HTTP::uri] contains ".3gp" ||
[HTTP::uri] contains ".mov" ||
[HTTP::uri] contains ".mp4" } {
log local0. "Using Sun_Stream_Servers"
pool Sun_Stream_Servers
} else {
log local0. "Using Real_Stream_Servers"
pool Real_Stream_Servers
}
}You could probably optimize this further by slapping the extensions in a string data group and use the findclass command. But for only a few extensions this is still manageable.
-Joe
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
