Re: checking for and enforcing https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---- Rick Pasotto <rick@xxxxxxxx> wrote: 
> What is the best or recomended proceedure for making sure that a page is
> accessed only via a secure connection?
> 

Make the server only send over 443 instead of 80...

But if you don't have the ability to change .htaccess or httpd.conf then you can use the $SERVER variables and make them work that way...

Or you can cheat...

 $url = $_SERVER['SERVER_NAME'];
 header( 'Location:https://'.$url.'');


Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux