This is probably a really dumb question, but I can’t figure out how to get the incoming HTTP protocol. ie, if the user accesses “http://server.com” I want “http”, or if the access “https://server.com” I want “https”. Is there a way to do this? Alternatively, if I could get the entire URL that would be even better.
I am trying to append the original URL to a redirect using:
If the VIP you’re using the iRule is only used for HTTP you could hardcode it to http://. If it could be used on an http or https VIP, you could either check TCP::local_port for 80 or 443, check [PROFILE::exists clientssl]==1 to see if a client SSL profile is configured on the VIP, or use SSL::cipher to check if the connection was encrypted.
Just to clarify, SSL::cipher will only work for a VIP which has a client SSL profile enabled. So the scenario you would use SSL::cipher to determine whether the clientside connection was using SSL is if you had a client SSL profile configured with the non-ssl option enabled.