Forum Discussion
Gary_Walderich_
Nimbostratus
Apr 24, 2007Help with creating http to https iRule redirect
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
Many Thanks!
-Gary
2 Replies
- hoolio
Cirrostratus
Hi,
There is an HTTP to HTTPS redirect example in the codeshare:
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTPtoHTTPSredirect.html
Click here
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.
Aaron - Gary_Walderich_
Nimbostratus
Thanks Aaron, I am actually running 9.1.2. I will try what you referenced above.
-Gary
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
