The output of $_SERVER[‘SERVER_SOFTWARE’] is WebServerX
That looks like your problem – check out this line in wp-includes/vars.php
:
/**
* Whether the server software is Apache or something else
* @global bool $is_apache
*/
$is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
I think you’ll need to override this variable manually, either in a plugin or your theme’s functions.php
:
global $is_apache;
$is_apache = true;
Props to @John P Bloch:
The only time it’ll automatically add ‘index.php’ to a permalink is if $is_apache returns false.