WordPress Permalink Issues in IIS, Working Around Mod_ReWrite with an ISAPI Filter
UPDATE: 10-07-08 :: I just received a comment from Bill Staples, a Microsoft Employee, who informs me that IIS7 indeed does support a URL rewrite, especially for WordPress. Please see comments section below for URL. Thanks Bill for setting the record straight. Perhaps now would be a good time for me to put the scotch bottle down and train up on Server 2008/IIS…
The information in this article will allow you to run WordPress permalinks on Windows Server 2000, 2003, or 2008 using IIS5, IIS6, or IIS7.
Ok, first of all there is no real MOD_REWRITE setting for IIS5 or IIS6. That’s an Apache mod and though there are some ISAPI_MOD_REWRITE projects floating around out there, most of them do NOT do the exact same thing as MOD_REWRITE does and will not function in IIS as MOD_REWRITE does in APACHE.
For programs such as Wordpress that normally are designed for Apache installations, you can install the following ISAPI filter and all your Permalink problems go away.
First, what is a Permalink. A permalink is what Wordpress uses to form the URL of your posts/pages into something more SEO friendly or human readable. (HINT: Get to Permalinks by logging into your WordPress Admin Panel your http://www.domain.com/wp-admin/ Click on SETTINGS, Permalinks.)
By default, a wordpress standard URL on Apache is formed as such: http://www.nickmattern.com/2008/10/06/sample-post/, In IIS, the WordPress URL uses the index.php file to display your permalinks, ex. http://shelbygirl.com/index.php/2008/10/06/sample-post/
Obviously the IIS URL doesn’t help the user remember your URL What most users and search engines want to see is a descriptive URL. www.domain.com/index.php?a=4423 is a LOT harder to remember than www.domain.com/AboutUs would be.
Format your Permalinks in the following manner: /%postname%/, making sure to begin each string with a /% and end each string with a %/. If I wanted my URL to have the Year/Date/Postname, I’d format my Permalink string as such: /%year%/%monthnum%/%postname%/
Now back to why this matters for IIS. First, Apache forms URLs without the need for index.php to be involved with the URL. Be default, in IIS, your permalinks will use this format: http://shelbygirl.com/index.php/2008/10/06/sample-post/ (Notice the index.php) whereas Apache will simply use http://www.nickmattern.com/2008/10/06/sample-post/. Now, according to numerous Google Blogs, the index.php shouldn’t really matter, and that’s mostly correct. The problem you’ll find is your users not being able to remember the index.php, they’ll simply see the domain.com/postname, not the domain.com/index.php/postname.
By installing the filter listed above (You’ll need to have access to the IIS manager and your PHP.ini file) you can eliminate the need for the index.php to be included in any URLs that Wordpress cranks out. Be sure to back up your PHP.ini file before you change it and while you’re at it, make a backup of your IIS Site as well.
Once the filter is installed, restart IIS and change your permalink structure accordingly, then test out your WordPress content. If it doesn’t work, go back and reread the instructions.
Popularity: 12% [?]


That’s a big thing because IIS is kind of pain in the neck to deal with, and it’s a security risk. Article Rewrite
Actually, IIS7 does have URL rewrite capabilities, and it can even import mod_rewrite rules from apache. For instructions on how to get wordpress permalinks to work, see this tutorial on IIS.net: http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/
You’ll want to download and install the URL rewrite module for IIS7 here: http://learn.iis.net/page.aspx/460/using-url-rewrite-module/
And contrary to what the last comment indicates, IIS actually has a better track record than Apache for the past 5-6 years. Check our http://secunia.com for data on the subject.
Thank you for the clarification Bill, post has been updated accordingly.