Nams_119859
Mar 22, 2013Nimbostratus
iRule to redirect to versioned url
Hello,
Need help with iRule. Below is an example of what we are trying to accomplish using iRule. We need F5 to redirect an url to the one that has a version number, by inserting the version number that comes in the header of the request.
Incoming request:
Url- http://xservices.abc.com/security/authentication/login/session/host
Request Headers:
Authorization: 550c2dbe-d3cc-47cf-84ba-b458869799ca
Version: 2.0
F5 should change the url to something like this- http://xservices.abc.com/2.0/securi...ssion/host.
Can you please suggest changes to the below iRule to read the version variable in header successfully?
if { [HTTP::host] eq "xservices.ual.com" } { HTTP::redirect "https:// [HTTP::host]/[HTTP:header Version]/[HTTP:uri] " }
Thank you.