Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar



Summary: Set links to http or https based on how current page accesed
Created: 2005-03-29 19:31
Status: Closed - added for 2.2.0-beta18
Category: Feature
Priority: 1
Version: 2.0 beta 26


In pmwiki.php any chance in future releases you might change

$ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];

to something like

if($_SERVER['HTTPS']=='on') $SSLpostfix='s'; else $SSLpostfix='' ; 
$ScriptUrl = 'http'.$SSLpostfix.'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; 

That way, if somebody enters the wiki with a secure connection, it will keep the internal wiki links secure also.

I realize that $PubDirUrl can be set as https:<site>(approve links) but that means all pages must be accessed SSL.

I don't think that the protocol, host name (and port number!) should be in $ScriptUrl at all. We run a number of wikis which are accessible by http: internally and https: externally, using a local/farmconfig.php (2.0.beta36)

        $ScriptUrl = $_SERVER['SCRIPT_NAME'];

without any other changes. Dropping the superfluous host reference leaves the work to the browser - where it belongs.
No host in $PubDirUrl either. tpahl

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:56 AM