[pmwiki-users] HTTP not being detected properly

Petko Yotov 5ko at 5ko.fr
Fri Jul 17 05:09:33 CDT 2015


You can (re)define the full $ScriptUrl variable near the top of 
config.php:

   $ScriptUrl = "https://www.example.com"; // or possibly
   $ScriptUrl = "https://www.example.com/pmwiki/pmwiki.php";

If that doesn't help, it is possible that some local configuration file 
or a recipe is resetting the $ScriptUrl variable: search for it and 
fix/remove it.

Petko

On 2015-07-17 02:02, Joshua J. Kugler wrote:
> 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:
> 
> _SERVER["HTTPS"]	on
> _SERVER["SERVER_PORT"]	443
> 
> But putting $ScriptUrl in a page still gives me:
> 
> http://my.host.name
> 
> j



More information about the pmwiki-users mailing list