Forum Discussion

Randy_Wooten_11's avatar
Randy_Wooten_11
Icon for Nimbostratus rankNimbostratus
Oct 25, 2006

Redirect HTTPS://ABC.com to HTTPS://XYZ.com

Hello Everyone,

 

 

I have been trying to create an iRule that will allow me to redirect a HTTPS request to another HTTPS request. Any help would be greatly appreciated.

 

 

History: I have a web site that uses a cert that is tied directly to the domain name (sitename.ABC.com). However, the workstations using this site have a different default domain name assigned in DHCP (XYZ.com), so when my users enter HTTPS://sitename, the workstation tries to use sitename.XYZ.com and not sitename.ABC.com. My user are getting the Security Alert that warns them about the name on the cert not matching the name on the site. I was hoping to do a HTTPS to HTTPS redirect to change the URI to something matching the certificate.

 

 

Thanks,

2 Replies

  • You can only do this if LTM is terminating SSL. Otherwise you have no way to inspect the headers to see what the host is.

    
    when HTTP_REQUEST {
      if { [HTTP::host] equals "sitename.XYZ.com" } {
        HTTP::redirect https://sitename.ABC.com
      }
    }

    should work in that instance.

    Denny
  • Thanks, Denny. Yeah, you are right. I am testing this with various iRules as a resource on my original HTTPS virtual server and am still getting the warning. The problem is I believe the warning is happening before any iRule (redirect) is processed because the cert on the original virtual server will always be used and never match the wrong host name. I will probably have to use two virtual servers, one each with a cert that matches the host name in the URI.

     

     

    Thanks for your help.