[pmwiki-users] HTTP not being detected properly

Joshua J. Kugler joshua at eeinternet.com
Thu Jul 16 19:02:10 CDT 2015

I am trying to serve PmWiki over HTTPS.  Even though phpinfo() reports that 
_SERVER["HTTPS"] is 'on' and the port is 443. ScriptUrl is still being set to 
http://<hostname> Any ideas?

The code is:

$UrlScheme = (@$_SERVER['HTTPS']=='on' || @$_SERVER['SERVER_PORT']==443)
             ? 'https' : 'http';
$ScriptUrl = $UrlScheme.'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];

And phpinfo output:


But putting $ScriptUrl in a page still gives me:



Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com - Fairbanks, AK
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

More information about the pmwiki-users mailing list