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
This commit is contained in:
parent
7cbf843347
commit
720316ddb1
|
@ -4,12 +4,14 @@ $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']);
|
||||
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') )
|
||||
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );
|
||||
|
|
Loading…
Reference in New Issue