Redirect URL after SSL Offloading and before server SSL encryption

Dear all,

I need some help because I have an issue with SSL traffic.

I have a virtual server that decrypt (SSL Offloading with approuved certificat) and encrypt (serverside with self-signed certificat) the traffic. I use an existing server SSL profile named “serverssl-insecure-compatible”.

I would like to apply a redirect just after the SSL offloading if the domain host match but I always received an SSL error. Here is my basic iRule:

Code
when HTTP_REQUEST {
  if {([HTTP::host] eq "a.mysite.com")}{
    HTTP::redirect "https://b.mysite.com/toto"
  }
  return
}

Hope you can help me !

Thanks in advance.

Best Regards,

Your setup sounds okay. Try the irule without the ‘return’ statement.

Can you paste all code from the iRule?

It’s all code I used

can you check this solution?

Thank you very much for your return !

I check this solution but I find where was the issue.

One of my colleagues added an iRule that modify headers to force “https” protocol in “X-Forwarded-proto” field.

Thank you so much for your support.