Forum Discussion
F5 iRule to replace host to path
Hi msaud,
Can you test the iRule?
when HTTP_REQUEST {
if { [HTTP::host] eq "mule-dev-azure-lb.ucsf.edu" && [getfield [HTTP::path] "/" 3] eq "api" } {
HTTP::redirect "https://[getfield [HTTP::path] "/" 2].azurewebsites.net[getfield [HTTP::uri] [getfield [HTTP::path] "/" 2] 2]"
return
}
}
- spalandeApr 24, 2024Nacreous
Do you need rewrite on the serverside session or redirect on the clientside (visible in the browser)?. iRule will change depending on the exact requirement.
- msaudApr 24, 2024Cirrus
Hi ,
exact iRule requirement is :
when client call it should be routed look like below on pool:
pool_mule-dev-azure-lb_dev-versa-chatapi_443
https://mule-dev-azure-lb.ucsf.edu/dev-versa-chatapi-functions/api/...... ---> https://dev-versa-chatapi-functions.azurewebsites.net/api/....
and
https://mule-dev-azure-lb.ucsf.edu/dev-versa-streaming-functions/api/... ---> https://dev-versa-streaming-functions.azurewebsites.net/api/.
pool_mule-dev-azure-lb_dev-versa-streaming_443
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