Force WordPress Login Page to Use SSL/HTTPS
From HowToGeek
If you want to force just the wordpress login page to use the SSL certificate you've installed on your server, you can add the following snippet of code to your wp-config.php file, or even just throw it into a simple plugin.
You'll need to make sure you've configured SSL properly before you do this, of course.
if($_SERVER["REQUEST_URI"] == "/wp-login.php" && $_SERVER["HTTPS"] != "on") {
$newurl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
header("Location: $newurl");
echo $newurl;
exit();
}
