On Tue, Jan 23, 2007 at 07:41:49PM +0100, [EMAIL PROTECTED] wrote:
> On Mon, 22 Jan 2007, Patrick R. Michaud wrote:
> 
> >Note that PmWiki version 2.2.0-beta18 and later automatically detect 
> >https: and use it accordingly.  So, with 2.2.0 you can do:
> >
> >   if ($UrlScheme != 'https:') {
> >     $ScriptUrl = str_replace($UrlScheme, 'https:', $ScriptUrl);
> >     if ([EMAIL PROTECTED]) { header("Location: $ScriptUrl"); exit; }
> >     Redirect($pagename);
> >   }
> 
> Could you explain the purpose of this code?

If someone accesses the site using a non-secure url (i.e.,
$UrlScheme is not 'https:'), then they are automatically 
redirected to the secure version of the requested page.

Pm

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to