Forum Discussion

JasonB_40800's avatar
JasonB_40800
Icon for Nimbostratus rankNimbostratus
Mar 15, 2009

HTTPS 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

 

}

 

}
  • 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.
  • That's exactly what's happening. What I was trying to do is redirect to "www" before the cert mismatch occurs.
  • 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.