I have an https virtual server that is 10.55.1.51 that contains a http service pool and a single node 10.110.240.66.
The problem I am experiencing is when a user access the virtual server over 443, and continues browsing the site, the user is redirected back to 80, due to how the code is written within the web application. How can I write an iRule to redirect http traffic from the BigIP back to the client as https?
Example: server --> http --> BigIP --> https --> client
If you’re running 9.4, you can actually do this redirect with an HTTP class on an HTTP VIP.
If you want to rewrite the Location header in the response from the web server, you can enable ‘rewrite redirects’ on the HTTP profile for the VIP. Check the LTM config guide for your version on AskF5.com for details.
Lastly, if you want to rewrite HTTP links to HTTPS in the content of the response, you can use the stream profile. Again, the LTM config guide should have details on this.