Changeset 21664 for trunk/wp-login.php
- Timestamp:
- 08/30/2012 01:33:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-login.php
r21507 r21664 13 13 14 14 // Redirect to https login if forced to use SSL 15 if ( force_ssl_admin() && ! is_ssl() ) {15 if ( force_ssl_admin() && ! is_ssl() ) { 16 16 if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { 17 wp_redirect( preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));17 wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) ); 18 18 exit(); 19 19 } else { 20 wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);20 wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 21 21 exit(); 22 22 } … … 366 366 $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); 367 367 368 $ schema = is_ssl() ? 'https://' : 'http://';369 if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('siteurl') )370 update_option( 'siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']));368 $url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) ); 369 if ( $url != get_option( 'siteurl' ) ) 370 update_option( 'siteurl', $url ); 371 371 } 372 372
Note: See TracChangeset
for help on using the changeset viewer.