SSL Cert warning with irule https to http
Hello all.. We have an issue where we need to redirect the request https://www.domain.com to https://domain.com. We have an irule in place, see below, that does this, however when the end user goes to https://www hey get a cert warning. We do not have a www.domain.com SSL cert, though we do have a domain.com SSL cert and the end users do not receive a warning when accessing that URL. Is there a way to keep them from getting the cert warning, someway to rewrite the URI or modify the request in some manner so when they visit https://www a rule or function takes place and they get redirected to the non www version. Obviously we could purchase a cert with the www version, but were trying to avoid that cost, if possible. Any suggestions or thoughts would be greatly appreciated
when HTTP_REQUEST { switch "[string tolower [HTTP::host]]" { "www.domain.com" { HTTP::respond 301 Location "https://domain.com" } } }
Thanks, Bob