is_IIS

Like is_apache, is_IIS is part of the web server detection. It is set in [wordpress root folder]/wp-includes/vars.php in the following manner:

$is_IIS=strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') 
           ? 1 : 0;

As mentioned in is_apache, the server variable SERVER_SOFTWARE can be blocked by certain hosts. It can be forcibly set to 1 if WordPress is running on Microsoft IIS.

A classic example of using the server detection is the pluggable function wp_redirect function, which handles the difference between IIS and Apache redirects. Plugin and theme developers should similarly use it for web server specific features.

Back to full list of global variables.

Technorati tags: , ,

Advertisements

No Responses Yet to “is_IIS”

  1. Abhijit Nadgouda @ iface » Blog Archive » is_apache Says:

    […] is_apache is set to 1 (which means true) if the webserver is either Apache or Litespeed (WordPress.com, i.e., even this blog runs on Litespeed today), which means that both of them can be considered to be practically the same. The other webserver that WordPress supports is Microsoft IIS which is indicated using the global variable is_IIS. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: