Forum Discussion
Rory_Hewitt_F5_
May 01, 2015Cirrus
How can I remove a query parameter from a URL?
I'm trying to remove a query parameter from a URL, and I'm stuck... Basically, I may have 0-n parameters appended to a querystring. They will all have a similar name, starting with "Context_", e....
kunjan
May 02, 2015Nimbostratus
if I know that the Context_ parameter(s) will be the last parameter(s)
Try this
when HTTP_REQUEST {
if {[HTTP::query] contains "Context_"} {
set pos [string first "Context_" [HTTP::query]]
set newq [string range [HTTP::query] 0 [expr $pos -2]]
HTTP::uri "[HTTP::path]?$newq"
}
}
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