WordPress setup
I think I’ve finally got all of the bugs worked out of my WordPress setup. The most exciting feature I was looking forward to enabling was the URL rewrite functionality for IIS. I used Helicon’s ISAPI Rewrite 3 Lite. Finding a complete, functional set of rules for the ISAPI Rewrite engine was the most difficult thing. I thought, “surely several people have gone through this already and posted their regular expressions for me to find with a quick google search.” It wasn’t as easy as I hoped but I finally found these:
[ISAPI_Rewrite]
# Force a trailing slash character on folders in the browsers addressbar
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]
RewriteRule (.*\.(?:jpg|gif|css|txt|xml|html)) $1 [I,L]
# For file-based wordpress content (i.e. theme, admin, etc.)
RewriteRule /wp-(.*) /wp-$1 [L]
# For XML-RPC functionality
RewriteRule /xmlrpc.php(.*) /xmlrpc.php$1 [I,L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [I,L]
RewriteRule /index.php(.*) /index.php$1 [I,L]
RewriteRule /(.*) /index.php/$1 [I,L]
This was a huge help, although I know how to write regular expressions, my experience is mainly with Microsoft’s syntax and I was not keen on learning Pearl just to get this working. Fortunately, this worked with only minor modifications.
I had to add the rule for the xmlrpc.php (XML-RPC) file otherwise Windows Live Writer and my WordPress for iPhone app would not function. And I had to make some other minor modifications but I don’t recall exactly what they were. These rules work fine for WordPress version 2.7 (the most current as of this writing).