Redirect SSL to SSL with header rewrite and certificates
Hi all. I have a question on using 301 or 302 redirects and SSL. I'm not sure if this can be solved by iRules.
The problem is the following:
X.bb.com is 1.1.1.1. If a user tries to connect to X.bb.com, it queries the GTM which returns 1.1.1.1. The users browser then connects to the VIP 1.1.1.1 on the LTM (which has the certificate X.bb.com). Everything is good.
If a user attempts to connect to Y.bb.com, the GTM returns 1.1.1.2. The users browser then connects to the VIP on the LTM at 1.1.1.2 which redirects to 1.1.1.1. However for this redirect to work there has to be a certificate for Y.bb.com else the user will get a certificate error. If there is a certificate for Y.bb.com, everything is good.
Easy answer is to get SAN certificate or a wild card or both! But if I only have a certificate for X.bb.com, is there a way to request Y.bb.com, get redirected to X.bb.com and re-write the header that won't give a certificate error? Maybe the simple answer is "no", but I would just like to confirm that.
I guess another solution would be that when the user attempts to connect to Y.bb.com, the GTM returns 1.1.1.1 and the iRule rewrites the header to X.bb.com - would that give a certificate error as the users browser still has Y.bb.com as the URL? I'm guessing it would.
Afraid I don't have an LTM to test at the mo'. Any help much appreciated!