Forum Discussion

tamins_90207's avatar
tamins_90207
Historic F5 Account
Nov 06, 2006

basic redirection of http reponse back to a standar port

Greetings,

 

I need to write an irule to deal with IIS6's courtesy redirect

 

Server replies to a client request with http://xyz.com:7081,

 

Is it possible to use an iRule to redirect the reply back to the client on standard port(80/443)?

 

 

Examples I have seen is for incoming redirection, but not outgoing.

 

 

thanks

 

 

 

2 Replies

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    It sounds like all you'd need to do is to re-write the host value during the HTTP_RESPONSE event.

    Something like:

    
    when HTTP_RESPONSE { 
      if { [HTTP::host] ends_with "7081" } {
        HTTP::header replace HOST [getfield [HTTP::host] ":" 1]
      }
    }

    HTH,

    Colin