SetupHTTPSThe internet community is rapidly moving to ensuring all websites are secure by using Hypertext Transfer Protocol Secure (HTTPS). Note that HTTPS and mobile friendly are used as ranking signals by search engines. This page is a placeholder or work in progress, serving to amalgamate information from the email list and recipes to where it should be held in the main PmWiki pages. HTTPS request handling by PmWikiPmWiki already responds properly to https: requests -- it detects when a request comes in via HTTPS and converts its outgoing links accordingly. This doesn't need a new variable. If you want to force all pmwiki-links to use https, then update $ScriptUrl = 'https://www.mydomain.com/path/to/pmwiki.php';
Chances are that a site is already setting I'd be fine with updating docs/sample-config.php to include something like: # If you prefer HTTPS over HTTP linkages: # $UrlScheme = 'https'; # $ScriptUrl = 'https://www.mydomain.com/path/to/pmwiki.php'; # $PubDirUrl = 'https://www.mydomain.com/path/to/pub'; PmWiki automatically redirect HTTP to HTTPSTo have PmWiki automatically redirect incoming HTTP requests to be a HTTPS request... that sounds recipe-ish. And it's much more efficient for it to be handled at the webserver level anyway (e.g., vis .htaccess, Redirect, etc.) At the beginning of if ($UrlScheme == 'http') { header( "Location: " . "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); exit('<html><body> <a href="https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '">Please use HTTPS</a> </body></html>'); } $ScriptUrl = "https://".$_SERVER['HTTP_HOST']."/pmwiki/pmwiki.php"; $PubDirUrl = 'https://'.$_SERVER['HTTP_HOST'].'/pmwiki/pub'; CertificateA certificate from a Certificate Authority is required, a self-signed certificate is no longer adequate[1].
ReferencesThis page may have a more recent version on pmwiki.org: PmWiki:SetupHTTPS, and a talk page: PmWiki:SetupHTTPS-Talk. |