Forum Discussion
Roger_Grannum_7
Nimbostratus
Oct 05, 2009HTTPS Redirect
Searching the forum for a sample IRule but could not find anything. Hoping I might get some direction from the forum. I'm looking for an IRule that will re-direct https request. I understand I will have to load the certificate on the F5 (no problem) but unsure if I just can use a IRule or would also need to utilize SSL Client Profile.
We are doing a site re-design with a new URL but not taking down the old (fall back)one, so we want the F5 to handle the re-directs.
Example: User types in https://www.oldsite.com/orders and I want them re-directed to https://orders.newsite.com/page1.
2 Replies
- The_Bhattman
Nimbostratus
If the LTM is carrying the cert and being applied by the SSL cleint profile then the F5 iRule should work since it's being decrypted.
NOTE: This is assuming the backend connection between the LTM and pool member is http
Here is an example of what the irule would look likewhen HTTP_REQUEST { if {[HTTP::host] eq "www.oldside.com" and [HTTP::uri] eq "/orders" } { HTTP::redirect "https://orders.newsite.com/page1" } }
I hope this helps
CB - Roger_Grannum_7
Nimbostratus
Thanks a million for the response -- Life Saver...
This is the project from hell -- I just got new requirements. The one or two URI's has become 60. So what I need is the use script above for one URI and then a "ELSE" "OR" to send everyone who does a https://www.oldsite.com/URI to go https://www.differentsite.com/ and past the URI -- "ELSE" "OR" https://www.oldsite.com (with no URI) to go to http://www.newsite.com
Is this possible???
Roger
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