Forum Discussion
igeo
Mar 04, 2022Nimbostratus
Trim parentheses via tcl
I have the following URL and would like to remove the parentheses (both) by using an iRule (TCL): http://ing1.example.com:31100/test1/test1.json/Streams(Type_4000000) whe...
- Mar 04, 2022when HTTP_REQUEST priority 500 {if { ([HTTP::host] eq "ing1.example.com:31100") and ([HTTP::uri] contains "Streams") } {set old_uri [HTTP::uri]HTTP::uri "[string map {( "" ) ""} $old_uri]"}}
igeo
Nimbostratus
There was an error when trying to save, so I added braces {}
{set new_uri [string map {( "" ) ""} $uri]}
However, this iRule doesn't remove the parentheses. The URL contains also a port, is it needed at the HTTP::host ?
xuwen
Mar 04, 2022Cumulonimbus
when HTTP_REQUEST priority 500 {
if { ([HTTP::host] eq "ing1.example.com:31100") and ([HTTP::uri] contains "Streams") } {
set old_uri [HTTP::uri]
HTTP::uri "[string map {( "" ) ""} $old_uri]"
}
}
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