[pmwiki-users] Detecting an SSL Connection

Ian Barton lists at manor-farm.org
Sun Aug 13 09:32:36 CDT 2006


> I'm using this to enforce an SSL-only wiki:
> 
>   if (!@strtolower($_SERVER["HTTPS"]) == 'on'){
>     header("Location: https://www.example.com/wiki/");
>     exit('<html><body>
>       <a href="https://www.example.com/wiki/">Please use SSL.</a>
>       </body></html>');
>   }
> 
> Hagan

Thanks both, that does exactly what I want.

Ian.




More information about the pmwiki-users mailing list