Forum Discussion

Eric_Frankenfie's avatar
Eric_Frankenfie
Icon for Nimbostratus rankNimbostratus
Jun 25, 2010

HTTP Redirects

I am new to iRules and going through baptism by fire. I would like the following URLs: http://www.qa.ipcws.fiserv.com, http://qa.ipcws.fiserv.com, https://www.qa.ipcws.fiserv.com, https://qa.ipcws.fiserv.com to be redirected to https://qa.ipcws.fiserv.com/cws.web/Login.aspx Any help would be greatly appreciated!

11 Replies

  • Unfortunately, no there is no way to prevent this for two reasons.

     

     

    1. You can’t modify encrypted traffic until it is decrypted, which won’t happen due to the SSL Mismatch (until you override it).

     

    2. The iRule Processing Event Order has several events prior to HTTP_REQUEST event, which is what you are using.

     

     

    RULE_INIT

     

    CLIENT_ACCEPTED

     

    CLIENTSSL_HANDSHAKE

     

    CLIENTSSL_CLIENTCERT

     

    HTTP_REQUEST

     

     

    The best you are going to be able to do in this case is apply the Redirect iRule to the HTTPS Virtual Server and let the user be redirected after the SSL Certificate Mismatch Error.

     

     

    Another way to do it would be to aim your @ record to a redirect Virtual Server that would do the “add www. and redirect to the www Virtual Server”, but you would have to get an SSL Certificate to apply to that Virtual Server, for your URL (without www) to prevent an SSL Certificate Error if the user access the HTTPS side of the URL.