[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:
http://www.pmwiki.org/wiki/PITS/00526
http://www.pmwiki.org/wiki/PITS/00527
http://www.pmwiki.org/wiki/PITS/00595
http://www.pmwiki.org/wiki/PITS/00619
and we should also probably consider
http://www.pmwiki.org/wiki/PITS/00764
It might be nice to really resolve this one, since it would close
at least five PITS entries. :-)
Pm
More information about the pmwiki-users
mailing list