Ticket #3514: wp-setting.diff
File wp-setting.diff, 1.4 KB (added by , 16 years ago) |
---|
-
wp-settings.php
27 27 28 28 // Fix for IIS, which doesn't set REQUEST_URI 29 29 if ( empty( $_SERVER['REQUEST_URI'] ) ) { 30 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?31 30 32 // Append the query string if it exists and isn't null33 if (isset($_SERVER[' QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {34 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];31 // IIS Mod-Rewrite 32 if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { 33 $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; 35 34 } 35 // IIS Isapi_Rewrite 36 else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { 37 $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; 38 } 39 else { 40 // If root then simulate that no script-name was specified 41 if (empty($_SERVER['PATH_INFO'])) 42 $_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/'; 43 else 44 $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO']; 45 46 // Append the query string if it exists and isn't null 47 if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { 48 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; 49 } 50 } 36 51 } 37 52 38 53 // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests