Forum Discussion

Alex_Shvartsman's avatar
Alex_Shvartsman
Icon for Nimbostratus rankNimbostratus
Aug 17, 2007

Append to Host Header

Hey guys, I'm new to the F5 environment and looking for a neat way to append a :443 to the backend request on an https irule. The caveat is that i need to continue to process the request for other checks once this is appended. It should also be transparent to the user. Basically a request would look as follows

 

 

Initial request:

 

 

https://www.host.com/blah/blah

 

 

Backend server sees

 

 

http://www.host.com:443/blah/blah <--yes, it will be clear text to backend, the :443 fools the webapp into thinking its secure traffic (don't ask me, i don't write these apps...just try to support)

 

 

User sees:

 

 

https://www.host.com/blah/blah <--should not be a simple redirect to www.host.com:443, the client will see this.

 

 

and I still need to make decisions on which pool to send traffic based on the URI.

 

 

Any assistance would be much appreciated.

 

 

Thanks!

 

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    This should do it:
    when HTTP_REQUEST {
      HTTP::header replace Host [HTTP::header Host]:443
    }
    /deb