[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] problems with the HTTPS environment variable provided by Apache



> We are working on a PHP-based e-commerce platform which offers
> secure connections via SSL encryption. As the application needs
> to find out whether SSL is being used for the current connection,
> it checks the HTTPS environment variable provided by Apache.

Why not grab the URL itself from the environment variable, parse it at
the colon, and do a check to see whether it says http or https?
Then if it does say https, continue - if not, dump 'em back to the
front page (or wherever) using the header:Location. I'd also use
sessions with this type of setup, so that someone can't come bouncing
into the third in a series of order pages without actually ordering
anything.

CarrieB