Forum Discussion
sharpie_79656
Nimbostratus
Sep 10, 2013iRule with Multiple Streams
I have an iRule that currently replaces instances of http with https found in javascript. This has been working for several months now. Recently we discovered a bug in the way a client performs a spe...
Kevin_Stewart
Employee
Sep 10, 2013You should need a STREAM expression to modify the URI. Try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"*repor?.dat*" {
set report_num [findstr [string tolower [HTTP::uri]] "repor" 5 ".dat"]
set old_value "repor${report_num}.dat"
set new_value "report${report_num}.dat"
HTTP::uri [string map "$old_value $new_value" [string tolower [HTTP::uri]]]
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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