wp-login.php – SSL redirect (set_url_scheme)
-
Some new code in wp-login.php for version 3.5.1 is breaking the admin side of our websites for some reason. I’ve had to comment out the block of code at the beginning of the script that “redirects to https, if forced to use SSL.” Here is a snippet:
// Redirect to https login if forced to use SSL /*if ( force_ssl_admin() && ! is_ssl() ) { if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) ); exit(); } else { wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); exit(); } }*/Apparently ‘set_url_scheme’ has replaced the use of ‘preg_replace’ used in previous versions. I’m not sure what the purpose of this code block is. We already have a redirect to https setup in our Apache config file, so it seemed safe to comment out this code. Is there a better way to keep ‘set_url_scheme’ from causing this problem. Specifically, the user enters credentials and clicks the submit button and nothing happens. Forgotten password link doesn’t do anything either. We have tried both the automatic and manual installation methods with all plug-ins disabled and with a standard theme, such as ‘Twenty Eleven’.
Thanks for taking a look. This is an Intranet site so there is no publicly available link.
The topic ‘wp-login.php – SSL redirect (set_url_scheme)’ is closed to new replies.