You’re a programmer? You need Consolas Thu, 4 May 2006 

Microsoft has released the Consolas font for users of Visual Studio 2005. As far as I’m concerned this is a must-have if you spend any time programming.

And now for an extra trick: how to use Consolas as your console window font on XP. Run this command to add Consolas as a valid console font:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
" /v 00 /d Consolas

Then reboot, and choose Consolas in the console window preferences.

WordPress as a CMS on IIS6 Fri, 23 Dec 2005 

Like (apparently) plenty of other developers, I feel like someday I will end up writing my own content management system. Until that day arrives, however, I’m trying WordPress.

I’ve made several trial runs with other systems. I got the farthest with Plone and PMWiki. Plone (and Zope, the system it’s based on) has a nice structure to it, but I found it to just be a little too much to deal with. PMWiki is really simple, but just not functional enough.

After shopping around some more, I’ve settled on WordPress, for now at least. It was very easy to set up, and simple to use as a CMS+Blog as opposed to one or the other. It’s also not cluttered up with “portal” features I don’t need.

I did have to search around a bit to find out how to get it running under IIS6 with “nice” URLs (that is, URLs without querystrings). I also wanted to use a static home page and put the blog on its own page. The correct combination turned out to be simple:

  • Use WordPress 2.0. (Actually I think this should work with 1.5, but I haven’t tried it.)
  • Use PHP5. I couldn’t get it to work with PHP4 no matter what I tried. There were a bunch of instructions around setting cgi.fix_pathinfo, which never seemed to work for me. PHP5 “just works”.
  • Install the (free) Ionic rewrite ISAPI. The rewrite rule you need in IsapiRewrite4.ini is:
    
    RewriteRule ^/(?!index.php)(?!wp-)(.*)$ /index.php/$1
    
  • Create home.php in the theme directory to define the static home page. I just pointed it to a page called “home”. You can define a whole new appearance in this file, but I already had a “noheader” template I wanted to use, so I just have this:
    
    
  • Create blog.pgp in the theme directory to define the new blog page’s template. Since I just wanted the default format, I reused index.php like this:
    
    
  • Create a new Page called “blog” using the Blog template. The contents don’t matter since the blog.php template never does anything with them.
  • Finally, set the permalink structure to /blog/%year%/%monthnum%/%day%/%postname%/ and /blog/category.

I’m pretty sure that was all I had to do. If I left something out, let me know.

Edit: Updated Ionic URL according to comment below.