[pmwiki-users] Enableing pmWiki for SSL

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 30 08:25:39 CDT 2007


On Mon, Apr 30, 2007 at 09:02:06AM +0200, Dominique Faure wrote:
> On 4/30/07, H. Fox <haganfox at users.sourceforge.net> wrote:
> >
> >I switched the contitional to this:
> >
> >  if (!$_SERVER["HTTPS"] == 'on' || @$_SERVER['SERVER_PORT'] != '443') {
> 
> You hurt my boolean algebra here: not(a or b) = not(a) AND not(b)
> so I would merely write:
> 
> if (!$_SERVER["HTTPS"] == 'on' && @$_SERVER['SERVER_PORT'] != '443') {

Or even:

    if (@$_SERVER['HTTPS'] != 'on' && @$_SERVER['SERVER_PORT'] != '443') {

And, for versions of PmWiki after 2.2.0-beta18, one can do the
equivalent with:

    if ($UrlScheme != 'https') {

Pm



More information about the pmwiki-users mailing list