Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

application port number rewrite while keeping everything after port number




I'm very novice with irules, so apologies if this has been answered before, I might need this to be spelled out better. I have a need to redirect a particular api endpoint to another port on the same vip, retaining everything after the port number. This needs to happen transparently with no redirect status codes.


For example, I'm doing an http post to, but that needs to redirect to There is a json payload with this http post


I have different Virtual servers for each port (same LB ip different pools for each port)


VirtualServer1 - - service port 8081

Pool1 - 2 members - port 8081


VirtualServer2 - - service port 8084

Pool2 - 2 members - port 8084


iRule is applied to VirtualServer1


Here is one of my failed attempts, I think I'm missing something important:

when HTTP_REQUEST {   if {([HTTP::uri] starts_with "/api/taxServices")}    {HTTP::header replace Host ""} }


I was able to do this with a profile thanks to the user guides and reading up on this page... ended up taking any requests for a specific uri string on the vip and forwarding the traffic to another vip. Appears to be functioning.