Forum Discussion
JasonB_40800
Nimbostratus
Mar 14, 2009HTTPS domain to HTTPS subdomain
Hello,
I'm trying to write an i-rule so "www" will be inserted anytime someone uses https://mydomain.com with no luck. I imagine it has something to do with the SSL, but I do have the wildcard ssl cert on the F5. Of course, it doesn't match "mydomain.com" because the cert is *.mydomain.com
I tried this, which works after the SSL cert error, but not before. Any thoughts?
when HTTP_REQUEST {
if { [HTTP::host] equals "mydomain.com" } {
HTTP::redirect https://www.mydomain.com
}
}
3 Replies
- Chris_56952
Nimbostratus
Wouldn't you need a second ssl cert for your mydomain.com site? I imagine the error you are getting is actually an ssl warning that the certificate's common name does not match the hostname of the site. - JasonB_40800
Nimbostratus
That's exactly what's happening. What I was trying to do is redirect to "www" before the cert mismatch occurs. - Chris_56952
Nimbostratus
Do you have hard-coded links somewhere pointing to https://mydomain.com/? Most end-users won't think to enter https in the protocol field in their browser so you might get by using a simpler http://mydomain.com/ to https://www.mydomain.com/ rule.
If they are though or if you have links to https://mydomain.com/ that you can't change, then I think you'll need an inexpensive ssl cert for your mydomain.com VIP in order to do this kind of redirection.
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