Forum Discussion
Irule redirection
Have a question about redirecting (IRULE) https://abc-beta.com/api1 need to be re-written as https://abc-beta.com:7070/api1
Where api1 is any web instance and there will be multiple sites per the user I have created a 7070 pool Having some issues writing an IRULE (new to irules configuration)
- Lee_Sutcliffe
Nacreous
Hi Jeff,
You shouldn't need to specify the port if the pool is configured on that port. F5 is a full TCP proxy so will do the port translation for you. For the redirect do you want users to access the /api1 URI to be directed towards the TCP/7070 pool? Likewise if /api2, directed towards another pool?
You use try iRulelike this one:
Code
When HTTP_REQUEST { if {[HTTP::uri] starts with /ap1 } { HTTP::redirect ";[HTTP::host]:7070"/[HTTP::uri] } else { HTTP::redirect ";[HTTP::host]:70070"/[HTTP::uri] } }
- JeffA55_350183
Nimbostratus
Sorry, one more question. Is there a way to a "rewrite" rather than a redirection.
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