Forum Discussion
CHRISTY_THOMAS
Jun 15, 2024Cirrus
Dynamic url redirection feasibility
In one of the BIG –IP integrated application need to redirect a dynamic url to other one. Requirement description: “” Client require the call back API to FED bank endpoint in format : IP:port/u...
- Jun 19, 2024
Based on what you provided in your screenshot it should be the following.
when HTTP_REQUEST priority 500 { if { [HTTP::host] eq "apiuatgwy.fedbank.com" } { if { [HTTP::uri] starts_with "/udir" } { set URI [string map -nocase {"/udir" "/sib/uat/udir/"} [HTTP::uri]] HTTP::uri ${URI} } } }
Paulius
Jun 15, 2024MVP
Assuming that you don't really have to pay any mind to the piece following this path "/udir/RespChkTxn/1.0/urn" because the remainder is dynamic the following should work. If you wish to have to have another redirect other than 302 then you could use HTTP::respond with the appropriate HTTP status value.
when HTTP_REQUEST priority 500 {
set URI [string tolower [HTTP::uri]]
if { [HTTP::host] eq "apiuatgwy.fedbank.com" } {
if { ${URI} starts_with "/udir/respchktxn/1.0/urn" } {
HTTP::redirect "https://[HTTP::host]/fed/uat[HTTP::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