I’ve been playing around with my site again. Trying to work out the beauty of my urls. I thought they looked pretty good… Well, similar to what I’m used to from BlogCFC anyway. The urls were like this: www.owenwebs.com/index.php/xxxx/xxx/xxx etc.. Which is not too bad… Better than the default: owenwebs.com/?p=13 or something silly like that. But, I’ve seen them better around the web. And made it a goal to get mine to work that way also.
After a bunch of Google-ing I found several solutions for IIS and settled on this solution for my “Pretty Permalinks“. This utilizes a ISAPI url rewriter from Dean Lee. Here’s how I went about making it work:
First, to use this method you will need to have desktop and Administrator access to yuor Windows Server. If you have that, go download the latest zip for your OS from the Google Code repository.
- Unzip the recently downloaded file to a new or existing directory. You will see the file called “wp-url-rewriting.dll” once you “unzip”.
- Open the Internet Information Services (IIS) Manager. You can get to this by clicking “Start” then “All Programs” then “Administrative Tools” then “Internet Service Manager (IIS) Manager”.
- Expand the “Web site” directory and select the icon for your website. For example, if you are using the “Default Web Site” for WordPress you would click that icon.
- Right-click the icon and select “Properties” from the menu.
- Click the “ISAPI Filters” tab and then click the “Add” button.
- Choose a name for the ISAPI filter and type it in the “Filter name” field.
- Click “Browse” and select the ISAPI filter (wp-url-rewriting.dll) that you unzipped into the directory in step 1.
- Click “OK.”
Check in the ISAPI filter area to make sure the status of the new “.dll” has a green arrow pointing upward. If you see that arrow, that indicates the filter is working properly. If you dont see the green arrow you will need to “stop” and “restart” the IIS Admin service.
Next you need to configure WordPress to use the new Permalinks. To do this:
- Login to the Admin panel and navigate to Options –> Permalinks.
- Choose permalink structure the click “Custom Structure” and remove “index.php” from the url. The new structure should look something like this: /%year%/%monthnum%/%day%/%postname%/
- Save your changes.
That’s it… Load your Website and refresh the changes, you should now have nice pretty permalinks. And, if like me, you started off using something like http://yourwebsite.com/index.php/page1 then those old urls should still work as well. So no lost traffic.
© 2009, Robert Owen. All rights reserved.