Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I need to ensure that the request coming in is via HTTPS not HTTP - perhaps even redirecting the user to the HTTPS page if required.

How can I detect whether SSL is used or not? The SERVER_PORT environment variable isn't sufficient if the web server is not running on standard ports, and SERVER_PROTOCOL is of no use either

Any ideas appreciated

2006-08-11 Retitled by planetscape, as per Monastery guidelines

( keep:0 edit:8 reap:0 )

Original title: 'Determining whether request is coming via SSL'

  • Comment on (OT) Determining whether request is coming via SSL

Replies are listed 'Best First'.
Re: (OT) Determining whether request is coming via SSL
by sgifford (Prior) on Aug 11, 2006 at 04:34 UTC