Index: wp-app.php
===================================================================
--- wp-app.php	(revision 11681)
+++ wp-app.php	(working copy)
@@ -296,6 +296,21 @@
 
 		log_app('REQUEST',"$method $path\n================");
 
+		// Redirect to HTTPS if FORCE_SSL_ADMIN or FORCE_SSL_LOGIN is true
+		$secure = false;
+		if ( is_ssl( ) || force_ssl_admin( ) || force_ssl_login( ) )
+			$secure = true;
+
+		if ( $secure && !is_ssl( ) ) {
+			if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
+				wp_redirect( preg_replace( '|^http://|', 'https://', $_SERVER['REQUEST_URI'] ) );
+				exit( );
+			} else {
+				wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
+				exit( );
+			}
+		}
+
 		$this->process_conditionals();
 		//$this->process_conditionals();
 

