Forum Discussion
irule : Append String to the pool member
To clarify, and explain why there is a bit of confusion, it's important to understand a few BIG-IP specific terms. In BIG-IP parlance, a Node is an IP address that is the target of a load-balancing or forwarding decision. A Pool Member is the combination of a node (IP) and target port. A Virtual Server is a virtual listener which accepts traffic, performs ADC or other (e.g., DDoS protection) functions, and possibly forwards or load-balances to one or more Pool Members (or, occasionally, Nodes).
So, when you say "append a string to each node", that's a bit confusing with the nomenclature above (and hence, my general confusion).
It seems that what you want is to change the uri-path to "/projector/api" if it is "/". The iRule you have above (formatted a bit differently immediately below) should do what you desire. I did change HTTP::uri to HTTP::path because HTTP::uri may include query parameters. Is your code not working?
when HTTP_REQUEST {
if { [HTTP::path] eq "/" } {
HTTP::redirect "http://[HTTP::host]/projector/api"
}
}
Incidentally, if you are running at least 11.4.0, you should consider using a Local Traffic Policy for this function:
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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