Forum Discussion
Rewrite Profile - 1 client URI maps to 2 server URIs
kristine_v I'm not aware of an easy way to do a stringmap of 1 name to 2 unique names. Any particular reason pool members can't be changed to accept requests for api01.apigateway.test.com instead of requiring api22 and api23.test.com for the respective pool member? This seems like a very complex bandaid on the F5 when the server should be able to be configured to accept request on the original FQDN.
- kristine_vSep 15, 2023
Altostratus
Hi, Paulius thank you for the information. This is a requested additional configuration by the end-user. Sadly, we're not given much details on why this must be resolved in the F5 side.
- PauliusSep 15, 2023
MVP
kristine_v I recommend going back to the end user and explaining why it shouldn't be done on the F5 and push them to make the adjustment on the server side. Just because something can be done on the F5 does not mean that it's the best approach, especially with this request. You might try the following iRule but I have never had to perform a modification to the HTTP header after the pool member has been selected. If you have more than 2 pool members then you would add in an "elseif" for each additional pool member. In the following you will replace x.x.x.x with the pool members IP for api22.
when HTTP_REQUEST_SEND priority 500 { if { [IP::server_addr] == "x.x.x.x" } { HTTP::host [string map {"api01.apigateway.test.com" "api22.test.com"}[HTTP::host]] } else { HTTP::host [string map {"api01.apigateway.test.com" "api23.test.com"}[HTTP::host]] } }
Recent Discussions
Related Content
* 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