From 720316ddb17a1105c33c9ee98173a44eaa5b8ed0 Mon Sep 17 00:00:00 2001 From: rboren Date: Tue, 26 Oct 2004 04:03:34 +0000 Subject: [PATCH] Do not touch REQUEST_URI if it is already set by the server. git-svn-id: http://svn.automattic.com/wordpress/trunk@1830 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 627dbb7e6..5f24275bb 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -4,11 +4,13 @@ $REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */ $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */ // Fix for IIS, which doesn't set REQUEST_URI -$_SERVER['REQUEST_URI'] = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']); - -// Append the query string if it exists and isn't null -if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { - $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; +if (! isset($_SERVER['REQUEST_URI'])) { + $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; + + // Append the query string if it exists and isn't null + if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { + $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; + } } if ( !(phpversion() >= '4.1') )