From: Bryan Tong Minh Date: Sun, 11 Apr 2010 15:38:58 +0000 (+0000) Subject: $_SERVER['REQUEST_URI'] is not available using IIS with rewrite rules, so use HTTP_X_... X-Git-Tag: 1.31.0-rc.0~37142 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=715e685546d34a60d52ed370099130c343896ba4;p=lhc%2Fweb%2Fwiklou.git $_SERVER['REQUEST_URI'] is not available using IIS with rewrite rules, so use HTTP_X_ORIGINAL_URL as alternative. --- diff --git a/includes/Setup.php b/includes/Setup.php index cd9146ab9d..b37fb5e0c8 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -182,7 +182,12 @@ if ( $wgCommandLineMode ) { wfDebug( "\n\nStart command line script $self\n" ); } else { wfDebug( "Start request\n\n" ); - wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" ); + # Output the REQUEST_URI. This is not supported by IIS in rewrite mode, + # so use an alternative + $requestUri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : + ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ? $_SERVER['HTTP_X_ORIGINAL_URL'] : + $_SERVER['PHP_SELF'] ); + wfDebug( "{$_SERVER['REQUEST_METHOD']} {$requestUri}\n" ); if ( $wgDebugPrintHttpHeaders ) { $headerOut = "HTTP HEADERS:\n";