I was developing this WP site using WAMP at work, and now suddenly we're switching it up and putting it on a Windows server (2003). I can tell from the Permalinks Settings page in wp-admin that it still thinks it's still running on Apache, because it gives me code for .htaccess instead of web.config file.

So I've tried all the fixes I've found around the web, some of them for WP on Windows/IIS still are .htaccess fixes, which I don't understand since IIS/Win doesn't use .htaccess. I found one solution involving .htaccess but seemed to have a prerequisite of PHP ISAPI, but wasn't very clear about that and I can't figure out how to install it anyway (very unfamiliar with Windows Server). I've tried solutions provided for web.config, also to no avail. One resource said to remove '/index.php' from the condition if( ! got_url_rewrite ) { $prefix = '/index.php'; } in wp-admin/options-permalink.php, that didn't work either.

How can I change WP to read the correct/current server type? Just to get WP "on the same page". Then, does anyone maybe have any other suggestions for me to get index.php out of the URL?

  • Have you deleted/renamed the .htaccess file?
    – s_ha_dum
    Feb 17, 2014 at 17:37
  • remove your .htaccess file and create a web.config file. WP should auto detect.
    – user42826
    Feb 17, 2014 at 17:39
  • I was so hopeful... but that didn't work. Still doesn't detect my web.config file and still gives me code for .htaccess.
    – user163831
    Feb 17, 2014 at 19:27

1 Answer 1


WP has global $is_iis7 variable, which is filled via following code:

$is_iis7 = $is_IIS && intval( substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) ) >= 7;

If detection is not working correctly likely something is going wrong with this line, such as server vars not being filled with the info expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.