So this is my first WordPress post. But if I did a good job matching it to my old Movable Type stylesheet, things should look pretty much the same (although I haven’t updated the templates for any of the pages besides the main page, so the archives, etc. are still a bit ugly).
Something I was looking forward to with WordPress was using it for managing all the pages on toppa.com. But I immediately ran into trouble when I discovered that, in order to do this, you have to install WordPress at the top of your web docs directory (which makes sense), and you can’t have the main page be named anything other than index.php. This was a potential show-stopper, since I’m not about to give up my uber-cool custom homepage for a same-as-everyone-else’s blog page.
I found a discussion thread on this, but the hidden option to change the filename they mentioned has been removed in the latest release of WordPress. It’s no longer a variable in the database, and they didn’t even have the decency to make it a variable in the code. Instead, the code alternates between hard-coded references to index.php, or it just assumes the default index file of the install directory. Lame.
But I like all the other aspects of WordPress enough that I decided it was worth a bit more investigation. First I thought of making a symlink, but I don’t have shell access to my site, and the FTP server is configured with a restricted set of SITE command options that doesn’t include symlink. So this is what I ended up with:
- My home page is at /index.html
- My blog page is at /index.php (fortunately the server is configured to give precedence to index.html)
- I added the following to my root .htaccess file:
RewriteRule ^blog(.*) /index.php$1 [R=301,L]
Since WordPress builds all it’s dynamic pages by relying on arguments to index.php, this redirect won’t drop query string arguments. I just have to be careful not to create any directories that start with the word “blog.”