If you install WordPress on IIS you will notice your friendly URLs do not work. This is because WordPress wants to use an apache add-on called “mod_rewrite.” The quick rundown of that this does is it will take your friendly browser URL and actually change them to index.php on the back end. One problem with this method is that IIS does not load apache mods. Here is an easy and free way around this:
- On your IIS Server download and install ISAPI_Rewrite Lite. This filter does the job of mod_rewrite for IIS. When downloading make sure to use the free Lite version. This Lite version does not limit the product very much and will be perfectly fine (and free) for our wordpress blog. Just install Rewrite Lite to the default locations for this tutorial.
- Next add the ISAPI filter to your IIS Site.
You will find this setting by right clicking yourIIS site -> properties -> ISAPI filters tab -> Add … Name the filter whatever you wish and your path to your executable should be:
C:Program FilesHeliconISAPI_Rewrite3ISAPI_Rewrite.dll
Click OK on both windows to save your settings. - Next navigate to C:Program FilesHeliconISAPI_Rewrite3
Here we will edit httpd.conf (Note: This is the difference between the pay version and the Lite version. In the pay version you will need to edit the .htaccess file on your web folders root) - Open the httpd.conf file in wordpad and paste in these lines:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [NC,L] - Save and exit this file.
- To complete your IIS changes, Go to start, run and run the command: iisreset /restart
- Now lets change your WordPress settings. Navigate to http://yourblog/wp-admin
- Navigate to the left side menu bar -> settings -> Permalinks
- Now you get to choose how you want your posts to look. I choose a custom setting and just: /%postname% This is how you see this blog working today.
- Click “Save Changes” and you should see your new friendly URLs!
Leave a Reply