diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 2ac305b95c..bfd2a5d333 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -80,13 +80,12 @@ $is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos( * Whether the server software is IIS or something else * @global bool $is_IIS */ -$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false); +$is_IIS = !$is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false); /** * Whether the server software is IIS 7.X * @global bool $is_iis7 */ -$is_iis7 = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false); - +$is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false); ?> \ No newline at end of file