Forum Discussion
Kevin_Stewart
Jun 06, 2013Employee
There's a million ways to manipulate strings in TCL/iRules. Here's one example that should meet your requirements.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/@v=" } {
extract the dynamic number data from the URI
set filter [findstr [string tolower [HTTP::uri]] "/@v=" 4 "@"]
use a string map to remove the number data
set newuri [string map "/@v=$filter@/ /" [string tolower [HTTP::uri]]]
HTTP::uri $newuri
}
}