Forum Discussion

Richard_Cowell's avatar
Richard_Cowell
Icon for Nimbostratus rankNimbostratus
Mar 19, 2020

HTTP redirect and response

I have an external url that I want requests that contain a specific uri to be directed to an internal server. I then want the response to appear to come from the original URL.

I have read and tried many different variations and have had no success. I am a newbie to irules etc so need it in a pretty simple format

I don't mind if it is 1 rule or multiple rules

  1. user enters my.server.com - routes to correct pool
  2. user enters my.server.com/uri - request is redirect using irule to internal.server.com/uri but response is from my.server.com/uri

Happy add any additional detail if my explanation is not clear

Thanks

Richard

  • Question: does internal.server.com have the BIG-IP as its' default gateway, or is the my.server.com virtual server configured to SNAT? If not, then the response won't come back through the iRule in any case.

     

    If either of those situations is correct, then you shouldn't have to worry about the response side of things in the iRule - just enable a stream profile on the VIP to replace internal.server.com with my.server.com.