Pretty Permalinks in WordPress: Rewriting URLs on IIS 7

by Bharat Suneja on December 22, 2008

I’ve been quite impressed with IIS 7 and the IIS blog in the past, and these guys continue to impress.

If you’ve noticed some changes on Exchangepedia recently – yes, the design tweaks are ongoing, and no – I’ve not completed the move to WordPress yet. Although I’m looking at other alternatives — including some based on .Net, it’s hard not to like WordPress 2.7!

But I digress. Back to IIS 7 and WordPress. As part of moving Exchangepedia to WordPress, I’ve been playing with address rewriting. Hopefully I’ll be able to retain the same permalink URLs generated by Blogger, or at least move away from the default WordPress URLs which look like: http://exchangepedia.com/blog/?p=417. WordPress itself calls them ugly URLs.

Although primarily targeted at open source components (the LAMP platform – Linux OS, Apache web server, MySQL database, and PHP), WordPress works just as well on Windows, IIS, MySQL, and PHP platform (aka “Let’s-just-say-the-acronym’s-nowhere-as-”pretty”-platform” :).

IIS 7 provides you the best of both worlds – the file-based configurations similar to Apache (using web.config files), and the GUI admin tools that most of us Windows folks are used to. (As a sidenote, IIS 7 also has a Powershell provider, bringing to it the same powerful, object-oriented shell interface you’re used to managing Exchange with. Download CTP2 of the PS provider for IIS 7 x86 | x64). Above all, IIS plays well with other, non-Microsoft parts of the stack, and the team doesn’t seem to want to hide that. In fact, most of my searches have led me to the IIS team blog, which has provided some great documentation, blog posts, and downloads.

WordPress.org does a great job of documenting things for its LAMP target audience – you can use Apache’s mod_rewrite module to rewrite URLs. See ‘Using Permalinks‘ in WordPress documentation for more information on how to do this.

On Windows and IIS 7, you can use the Microsoft URL Rewrite module for IIS 7 (Download x86 | x64 | Documentation). A simple edit to the web.config file in your WordPress directory, and pretty permalinks are live!

Read Ruslan Yakushev‘s post on the IIS blog for more info: Enabling Pretty Permalinks in WordPress.

{ 2 comments… read them below or add one }

1 Anonymous January 25, 2009 at 10:35 am

Hi Bharat,

Thanks for nice Exchange post. I have been reading it all the time.
I am also setting up my own blog but wonder if you are kinf enough to provide your theme for me to use?

I use wordpress.
THanks.
Chee

Reply

2 Bharat Suneja January 25, 2009 at 12:12 pm

@Chee: Exchangepedia has not been moved to Wordpress yet. What you see is published by Blogger using the old template-based Blogger, and I’ve lost track of the number and type of customizations to the template.

Take a look at the CSS stylesheet, if that helps.

Reply

Leave a Comment

Previous post:

Next post: