Forum Discussion

Jas_44429's avatar
Jas_44429
Icon for Nimbostratus rankNimbostratus
Dec 15, 2010

irule for HTTP header rewrite

Hi,

 

Fairly new to F5's (as you can probably tell from the question) but I wish to write an irule which will:-

 

 

replace http://10.10.10.10/whatever1/whatever2.txt

with http://www.test.co.uk/whatever1/whatever2.txt

 

 

 

and forward the connection on to two internal servers. Our belief is that the internal servers need to see the connection arrive with the name and not the IP address!

 

This purely an intranet solution.

 

 

 

One solution is that we would change this at the source of the connection, but most client users would attempt to connect via IP address.

 

 

Any kind person able to offer what a possible irule would like like? Apologies if this is discussed elsewhere...

 

Thanks,

 

 

 

6 Replies

  •  

     

    Hi all,

     

     

    I'm wondering if the above iRule will replace the HTTP header in the client side or just replace the http header and forward it to the internal server(s).

     

     

    BR,

     

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    If you're looking to perform an actual client side redirect, wherein the client sees the new host address, you'll want to use the HTTP::redirect command.

     

     

    Click Here

     

     

    Colin