CodeShare
Have some code. Share some code.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner
hooleylist
Cirrostratus
Cirrostratus

Problem this snippet solves:

This iRule sends an HTTP redirect to clients who make an HTTP request to an HTTPS virtual server. In order for this iRule to work, non-SSL connections must be allowed on the client SSL profile.

Code :

when HTTP_REQUEST { 

   # Check if the client used an SSL cipher 
   if {not ([catch {SSL::cipher version} result]) && [string tolower $result] ne "none"}{ 

      # Client did use a cipher 
      log local0. "\$result: $result. Allowing encrypted request." 

   } else { 

      # Client did not use a cipher 
      log local0. "\$result: $result. Redirecting unencrypted request." 
      HTTP::redirect "https://usesslplease.example.com/" 
   } 
}
Version history
Last update:
‎18-Mar-2015 14:35
Updated by:
Contributors