Forum Discussion

AlexDeMarco's avatar
AlexDeMarco
Icon for Nimbostratus rankNimbostratus
Mar 05, 2012

Change url & port

on a vip that receives a request with a host header of :

 

 

....

 

 

on the outbound back to the server(the entity that is calling it) I want to change it to(no port & new name)

 

 

....

 

 

 

I have been trolling thru the forums and have tried a variety of variations that I have found without success.

 

 

Can someone give me some pointers?

 

thanks!

 

 

- Alex

 

 

 

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Yep.

     

     

    There's a couple of ways.

     

     

    1. You could brute force change the host: header in the request every time via an iRule

     

    2. You could test the host: header passed and

     

     

    Checkout the [HTTP::header ...] commands in the iRules wiki for quick exampels of altering the host header.

     

     

    or for more complex requirements, you can use a stream. That could be hard-coded (Via a stream profile), or implemented via an iRule (See the proxyPass iRule for an example - Requires a generic stream profile with no content added to the VS though).

     

     

    Extra logic can be put in an iRule (If you don't use a hard-coded stream profile) to only perform the stream alterations for particular content. The advantage of a stream is the content would be altered too as well as the header.

     

     

    H