is_apache global variable can be used to detect which webserver Wordpress is running on. It is set in [wordpress root folder]/wp-includes/vars.php as part of the server detection code. It is set in the following manner:
$is_apache=(strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ||
strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed')) ? 1 : 0;
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.
It is possible that certain hosts block the server variable SERVER_SOFTWARE, which can cause problems in using permalinks. is_apache global variable can be forcibly set to 1 for an assured Apache/Litespeed webserver as advised here.
Plugin and theme developers can use these global variables for any web server specific features. One of the biggest features of Wordpress - permalinks - requires identification of the web server.
Back to full list of global variables.
Technorati tags: is_apache, permalinks, apache, litespeed,



June 25th, 2006 at 9:02 am
[...] $is_apache [...]
June 26th, 2006 at 7:32 am
[...] Just 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: [...]
November 24th, 2006 at 2:18 pm
[...] Browser and Server Detection: is_winIE or is_macIE, is_IIS, is_apache, and wp_db_version [...]
October 23rd, 2007 at 8:14 pm
[...] $is_apache [...]