Return to Snippet

Revision: 28505
at July 9, 2010 01:22 by StevenW721


Initial Code
function forceSSL ()
{	// force SSL usage and use of WWW
	if (($_SERVER["SERVER_PORT"] != 443)) {
		header("Location: " . "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
		exit();
	}
}

Initial URL

                                

Initial Description

                                

Initial Title
Force SSL usage

Initial Tags

                                

Initial Language
PHP