Forum Discussion

James_Michalak_'s avatar
James_Michalak_
Icon for Nimbostratus rankNimbostratus
Aug 21, 2006

Determine if Client Request is 'https'

I'm trying to determine if a request made to a virtual server on a bigIP was made using the https protocol. I've went down several different avenues to obtain this information. I've tried looking in the headers. I've looked at using [URI::...], [HTTP::...], and [SSL::...] but haven't been able to extract the information from the request. Any ideas?

 

 

Ultimately I would like to have to have an if/elseif for the use of http or https. Please advise.

 

 

Thank you!

2 Replies

  • Take a look at this thread:

     

     

    http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=5485 Click here

     

  • It worked perfectly. Thank you citizen!!

     

     

     

    if {[catch {PROFILE::clientssl mode}] == 0} {

     

    log local0. "is SSL"

     

    HTTP::redirect "https://[HTTP::host]/"

     

    }

     

    else {

     

    log local0. "not SSL"

     

    HTTP::redirect "http://[HTTP::host]/"

     

    }

     

     

    This is part of an iRule we were using when our maintenance page is up. Thank you for the quick response!!