HTTPS-to-HTTPS redirect

Hello,

I am trying to redirect an https URL to another https URL and am not able to. Can someone let me know if this is possible? My rule scenarios are below.

******************************

virtual 12.x.x.x:443 unit 1 {

use rule RDC-Redirect-test

rule RDC-Redirect-test {

if (http_host contains “app.domain1.com”) {

redirect to “https://myapps.domain2.com/%u”

}

else {

discard

}

******************************

virtual 12.x.x.x:443 unit 1 {

use rule RDC-Redirect-test

}

rule RDC-Redirect-test {

redirect to “https://myapps.domain2.com/%u”

******************************

Davean,

this cannot work unless you first decrypt the SSL. The rule parser cannot match the HTTP Host header (which is what the http_host directive is looking for) in the encrypted content. The connection has to be handled by SSL proxy using your virtual as a back-end. The configuration may look like this:

rule RDC-Redirect-test {
   if (http_host contains "app.domain1.com") {
      redirect to "https://myapps.domain2.com/%u"
   }
   else {
       discard
   }
}
virtual 127.0.0.1:8888 unit 1 {
   use rule RDC-Redirect-test
}
proxy 12.x.x.x:443 unit 1 {
   target virtual 127.0.0.1:8888
   clientssl enable   
   clientssl key 
   clientssl cert 
}

Caveats: you either need to move the certificate from your server to the BIG-IP or get a new one.

I figured the encryption had something to do with it. unfortunately another certificate is not an option right now. I appreciate the info. This was a great of help!! Thanks!

Actually, I took what you said and created a self signed certificate. since it redirected the request I didn’t get prompt that this certificate was not valid, which is what I didn’t want my users to see.

Thanks for the direction/resolution!