Forum Discussion
HTTP redirection issue
Hi all,
I was wondering if someone could help me fix a http redirection issue.
Basically, we are terminating https/ssl connections on the LTM. Then the LTM talks to the server using http. The problem occurs when the application running on the server asks the client to get a resource on http. Since the LTM is only listening to https, the communication breaks.
2 Replies
- Kevin_Stewart
Employee
There's generally two ways to handle this, both depending on how the information is presented to the client.
For HTTP 30x redirects, the Redirect Rewrite setting in the HTTP profile will automatically rewrite http:// to https:// in outgoing redirect Location headers.
For everything else, you'd need an iRule and a STREAM profile. Insert an empty STREAM profile into the VIP's configuration and an iRule like this:
when HTTP_REQUEST { HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE { if { [HTTP::header Content-Type] contains "text" } { STREAM::expression {@http://@https://@} STREAM::enable } }This works by enabling the STREAM profile on egress text-based traffic only to replace any instance of "http://" with "https://" in the response payload.
- Humair_167681
Nimbostratus
Thanks Kevin.
Much appreciated!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com