Forum Discussion
Joe_Pipitone
Nimbostratus
Jan 28, 2010ssl redirect not working
I have 2 separate VIP's, one for traffic on port 80, another for port 443. They both have the same VIP.
Traffic works fine on both port 80 and 443.
W...
Joe_Pipitone
Nimbostratus
Jan 29, 2010Thanks for your help - I don't think this is going to help us though.
We have decided to use a certificate for https://oursite.com. If a user hits our SSL VIP (VIP-oursite-443) directly by typing in https://oursite.com or https://www.oursite.com I need to force that traffic to https://oursite.com
I've created an iRule and applied it to the SSL VIP using port 443, but it doesn't seem to want to work.
This code both does NOT strip the www, and breaks SSL completely:
when HTTP_REQUEST {
HTTP::redirect https://oursite.org[HTTP::uri]
}
I also tried this, does not break SSL but does not strip the www
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.oursite.org") } {
switch -glob [HTTP::uri] {
"/" { HTTP::redirect "https://oursite.org" }
default { HTTP::redirect "https://oursite.org[HTTP::uri]" }
}
}
}
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