Forum Discussion
FSC-IT_27241
Nimbostratus
Oct 20, 2008Irule to redirect https to http
Situation:
There is a hardcoded URL that goes to https://junk.domain.com/ in an application. I want the f5 to redirect any traffic destined to that domain to a different site located else where on the internet via http://realjunk.domain.com/ But I don't want the expense of adding a certificate to my f5 and I cannot change the software application with the hard coded https url.
Can this be done?
I have done a simple vitual host with a redirect rule and it works if I use one of my existing ssl profiles but I get the error that the cert does not match. Which is true but ultimately I am really redirecting to a non ssl site.
Thoughts?
2 Replies
Sort By
- hoolio
Cirrostratus
Hi there,when HTTP_RESPONSE { Check if response type is text if {[HTTP::header value Content-Type] contains "text"}{ Replace https://junk.domain.com with https://realjunk.domain.com STREAM::expression {@https://junk.domain.com@https://realjunk.domain.com@} Enable the stream filter for this response only STREAM::enable } else { Disable the stream filter by default STREAM::disable } }
- dennypayne
Employee
The problem is that you can't invoke HTTP events such as redirects in an iRule without using an http profile on the virtual, and to do that, you've got to decrypt, which means handling the SSL cert first.when CLIENT_ACCEPTED { SSL::disable pool myPool }
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