[pmwiki-users] Protocol (https/http) included in $ScriptUrl

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 7 15:40:42 CDT 2006

On Thu, Sep 07, 2006 at 10:10:46PM +0200, Nils Knappmeier wrote:
> this is not urgent, since I solved it by setting $ScriptUrl manually, 
> but anyway.
> It would be nice, if the protocol part of the URL (https or http) would 
> be used as protocol part, of $ScriptUrl.
> At the moment, $ScriptUrl is composed as
>     $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
> Is it possible, in future releases, to change this to
> if ($_SERVER['HTTPS'] == 'on') {
>     $ScriptUrl = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
> } else {
>     $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
> }
> or something similar?

There's a number of issues related to this, also having to do with
relative versus absolute links.  They're described in:


and we should also probably consider


It might be nice to really resolve this one, since it would close
at least five PITS entries.  :-)


More information about the pmwiki-users mailing list