Forum Discussion

Mostafa_Elsayed's avatar
Jun 24, 2021

IRULE to redirect HTTP response port

i want to create IRULE to make port redirection to my VIP port at HTTP response.


Website_VIP :

and when i access this website , it redirects me to "" with HTTP Response code 302, but this vip isn't exist, so i want to create irule to redirect me again to my VIP.

3 Replies

  • Hi,


    i think i got what you want look here is an irule example in case of redirection (302):-


    when HTTP_RESPONSE { if {[HTTP::status] == "302" } 

    { HTTP::header replace Location [string map {"myserver.domain:4443" "myserver.domain"}[HTTP::header Location]] }}



  • You haven written well your question and I don't get what you want, still I see that you have many posts for basic irules so I recommend taking the F5 course "Developing iRules for BIG-IP"




    You can also review the free comunity resources: