Forum Discussion
Village_Idiot
Nimbostratus
3 years agoCapture part of URL to redirect to another
I have a request to redirect from one URL to another based on the word "LOAN" in the query part of the URL. They only want to keep a random length string from the old URL to the redirected one Examp...
- 3 years ago
Hello there,
if the requested information is always stored in variable KT1112_0_0_0= at request time, this script will capture exact variable value (not bound to length) and insert it in redirect url as acctNum valuewhen HTTP_REQUEST { if { [HTTP::uri] contains "LOAN" }{ set acctNum [findstr [HTTP::query] "KT1112_0_0_0=" 13 &] HTTP::redirect "https://website2.domain.com/path/app.aspx?acctNum=$acctNum&acctType=LOAN&type=Documents" } }It's working in my lab
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