Forum Discussion
NorCalAdam_6796
Nimbostratus
Jun 06, 2013Replace URI (wildcard) with null
Ive been searching around the last couple days and haven't been able to find a good solution to this yet. I tried to accomplish it with sting map so I wouldn't have to use regex but it doesn't seem t...
Kevin_Stewart
Employee
Jun 06, 2013There'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
}
}
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