From afe99eac27200889780e9d38ca94de834e004296 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Wed, 5 Jan 2005 02:06:16 +0000 Subject: [PATCH] Sometimes PATH_INFO is in there anyway, so this gives us SCRIPT_NAME without relying on mod_rewrite, should be cross-platform. git-svn-id: https://develop.svn.wordpress.org/trunk@2047 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-login.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-login.php b/wp-login.php index 1bcd034bfe..e512e75214 100644 --- a/wp-login.php +++ b/wp-login.php @@ -10,6 +10,9 @@ header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); // If someone has moved WordPress let's try to detect it +if ( isset( $_SERVER['PATH_INFO'] ) ) + $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); + if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') ) update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );