Ticket #5682: 5682_fcgi.patch

File 5682_fcgi.patch, 579 bytes (added by ruslany, 3 years ago)

Extra condition to check for php_sapi_name()

  • wp-settings.php

     
    6060if ( ! isset($blog_id) ) 
    6161        $blog_id = 1; 
    6262 
    63 // Fix for IIS, which doesn't set REQUEST_URI 
    64 if ( empty( $_SERVER['REQUEST_URI'] ) ) { 
     63// Fix for IIS when running with PHP ISAPI 
     64if ( (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false && php_sapi_name() != 'cgi-fcgi') || empty( $_SERVER['REQUEST_URI'] ) ) { 
    6565 
    6666        // IIS Mod-Rewrite 
    6767        if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {