January 12, 2010 – 10:38 am | No Comment

Well, yet another project makes the front page of local media!
Link to original story!

Aberdeen, South Dakota, is a great city to live in.  It is a great city to raise a family in.  Most of …

Read the full story »
PPC

Internet Marketing

Reputation Management

SEO

Social Media

Home » Hosting Basics, Server Secrets, Webmaster Tools

WordPress Permalink Issues in IIS, Working Around Mod_ReWrite with an ISAPI Filter

Submitted by Nick on October 6, 2008 – 9:23 pm3 Comments

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: 11% [?]

3 Comments »

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.