Forum Discussion
msaud
Apr 22, 2024Cirrus
F5 iRule to replace host to path
Hi Team,
Can someone please help me to create iRule to achieve below requirement.
I have created one VS " vs_mule-dev-azure-lb.ucsf.edu_443 and want to route the traffic as below
https://mule-dev-azure-lb.ucsf.edu/dev-versa-chatapi-functions/api/...... ---> https://dev-versa-chatapi-functions.azurewebsites.net/api/....
https://mule-dev-azure-lb.ucsf.edu/dev-versa-streaming-functions/api/... ---> https://dev-versa-streaming-functions.azurewebsites.net/api/.
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 } }
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