From c698c9719876ca22d5cd51ca0ecc87dfafe9d5aa Mon Sep 17 00:00:00 2001 From: markjaquith Date: Tue, 9 Oct 2007 17:38:25 +0000 Subject: [PATCH] IIS REQUEST_URI-setting fixes from snakefoot. fixes #5160 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@6208 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index b263317d9..de106f3aa 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -36,16 +36,10 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) { else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } - else { - // If root then simulate that no script-name was specified - if (empty($_SERVER['PATH_INFO'])) { - if (isset($_SERVER['ORIG_PATH_INFO'])) - $_SERVER['REQUEST_URI'] = $_SERVER['ORIG_PATH_INFO']; - else - $_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/'; - } - elseif ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) - // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) + else + { + // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) + if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO']; else $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];