Don't like ads? PRO users don't see any ads ;-)
Guest

Testorz

By: hitec7 on May 9th, 2012  |  syntax: PHP  |  size: 0.63 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * WordPress User Page
  3.  *
  4.  * Handles authentication, registering, resetting passwords, forgot password,
  5.  * and other user handling.
  6.  *
  7.  * @package WordPress
  8.  */
  9.  
  10. /** Make sure that the WordPress bootstrap has run before continuing. */
  11. require( dirname(__FILE__) . '/wp-load.php' );
  12.  
  13. // Redirect to https login if forced to use SSL
  14. if ( force_ssl_admin() && !is_ssl() ) {
  15.         if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
  16.                 wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));
  17.                 exit();
  18.         } else {
  19.                 wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
  20.                 exit();
  21.         }
  22. }