iRule HTTPS to HTTPS redirection

Dear All,

I have a virtual server publishing a https://www.xpto.com website.

I need to redirect via irule the requests from the old site https://www.xpto.com to the new https://www.abc.com. The http redirection is working fine, but the https show a certificate error

Both have ssl profile.

Thanks, Marcelo

Can you share some more details? What kind of error do you get? When you browse to directly https://www.abc.com, do you get the same error? How did you configure the redirect?

ERR_CERT_COMMON_NAME_INVALID

Do I need to declare in irule the old site’s certificate profile to get around this error?

The vs of https://www.xpto.com uses the client profile xpto_ssl_profile and the old site (https://www.abc.com) used the abc_ssl_profile.

How can i fix this common name error?

when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ends_with ".abc.com" } {
    HTTP::redirect "https://www.xpto.com[HTTP::uri]"
}

}

If I understand correctly it seems your uses the wrong certificate. Can you login to your BIG-IP with ssh and show the output of the following commands?

curl -kv https://www.abc.com
 curl -kv https://www.xpto.com

I gave up trying the redirect on the same VS.

I created a new text with the profile of the old certificate doing the redirection.