Forum Discussion

jacknew_327096's avatar
jacknew_327096
Icon for Nimbostratus rankNimbostratus
Jul 13, 2017

rewrite iRule for legacy domain

Hi. I am trying to fix a problem with a legacy application that is getting a new domain.

 

The app server is old and only handles absolute URLs, but is getting a new domain. I need to write an iRule that will handle clientside traffic with the new domain, but send all traffic to the server with the legacy domain name.

 

Can you please help?

 

3 Replies

  • To clarify, I need the client-to-external-vip to be

     

    new.domain.com > VIP

     

    F5-to-servers > old.domain.com HTTPS headers

     

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    Not sure if this works! But give it a try..

     

    when HTTP_REQUEST {

     

    HTTP::header replace Host "old.domain.com"

     

    }

     

    Apply this iRule to your new.domain.com VIP.

     

  • You don't need an irule to do this, you can use a policy to re-write the host headers

     

    Local Traffic ›› Policies : Policy List