Phil proves hyphens are cooler. This is—of course— how we do it in WP. I promise I’ll stop talking about WordPress in every post at some point.
Category Archives: Asides
WordPress in Hindi
WordPress in Hindi. It’s the first full localization I’ve seen and it gives me chills. Congrats to Pankaj.
MT Keywords
LibraryPlanet.com » MT Keywords to WP Slugs. Something is funky with the CSS on this site, slows my browser to a crawl.
i let u b u
DomainKeys
DomainKeys could change email and the markup and CSS on that page is pretty decent. Hat tip: Jeremy Zawodny.
PHP is not always open
Shelley on encoded PHP in EE and a cat in peril.
Out Of The Rut
Out Of The Rut, Into The Groove from Virulent Meme. “Uh-oh, Advocacy!”
Olympus Ferrari
Ferrari digital camera in a gorgeous red. Hat tip: Nick Finck.
Movable Type to WordPress
Moving from Movable Type to WordPress by Carthik Sharma.
Audioblog
Audioblog.com supports WordPress now. MetaWeblog API is nifty. Wasn’t there a free service that also did this?
Pink
Pink is the new pink. I hadn’t done a design from scratch in a while. Hack-free CSS, two images.
Mark Switched
Mark switched, puts his money where his mouth is, and understands freedom.
No Fruit
Simple Backup
Thanks For the Trackbacks
Adam switches to WordPress. I promise this had nothing to do with my hosting him. (Though when he was beta testing MT3 I did notice some strange CPU spikes.)
Migration Patterns
Eric talks about why he moved to WordPress. RSS import was a killer feature for him.
What WordPress Does Right
On Orkut
What can I say, I like it. Orkut is a new social networking site funded by Google that takes the best of all the other sites out there and rolls it into one fast system. Let me emphasize fast. I gave up on Friendster because I’m not patient enough to wait minutes for every screen to load. I don’t know if anyone else has noticed this, but every site I’ve tried so far (with the exception of LinkedIn) feels like it’s held together by spit and duck tape and run on a 486. Not to mention the atrocious markup.
A neat thing about Orkut is that it’s invitation-only, so everyone there is connected to the original seed guy and programmer (whose name is Orkut, incidentally) which I think is an interesting idea. Scott Allen (who has a great new WordPress-powered blog) says that’s the most innovative thing about Orkut.
Scott remarked to me that he didn’t see Orkut flourishing the same way Ryze or Linkedin have because it mixes the personal and business aspect of things, while those two are mainly for business networking and only flirt with personal aspects. It’s too soon to tell, but I think Orkut is going to be a big success. It does a lot of things right.
So go check it out, and if you’re having trouble getting in let me know and I’ll send you an invite. If you’re already on, introduce yourself.
Wildcard DNS and Sub Domains
What follows is what I consider to be best practice for my personal sites and a guide for those who wish to do the same. Months ago I dropped the www. prefix from my domain in part because I think it’s redundant and also because I wanted to experiment with how Google treated valid HTTP redirect codes. The experiment has been a great success. Google seems to fully respect 301 Permanent Redirects and the change has taken my previously split PageRank has been combined and now I am at 7. There are other factors that have contributed to this, of course, and people still continue to link to my site and posts with a www. (or worse) in front of it, but overall it just feels so much cleaner to have one URI for one resource, all the time. I’m sure that’s the wrong way to say that, but the feeling is there nonetheless.
Now for the meat. What’s a good way to do this? Let’s look at our goals:
- No links should break.
- Visitors should be redirected using a permanent redirect, HTTP code 301, meaning that the address bar should update and intelligent user agents may change a stored URI
- It should be transparent to the user.
- It should also work for mistyped “sub domains” such as
ww.orwwww.(I still get hits from Carrie’s bad link)
So we need a little magic in DNS and in our web server. In my case these are Bind and Apache. I am writing about this because at some point the code I put in to catch any subdomain stopped working and while I reimplemented it I decided to write about what I was doing. This method also works with virtual hosts on shared IPs where my previous method did not.
In Bind you need to set up a wildcard entry to catch anything that a misguided user or bad typist might enter in front of your domain name. Just like when searching or using regular expressions you use an asterisk (or splat) to match any number of any characters the same thing applies in Bind. So at the end of my zone DB file (/var/named/photomatt.net.db) I added the following line:
*.photomatt.net. 14400 IN A 64.246.62.114
Note the period after my domain. The IP is my shared IP address. That’s all you need, now restart bind. (For me /etc/init.d/named restart.)
Now you need to set up Apache to respond to requests on any hostname under photomatt.net. Before I just used the convinence of having a dedicated IP for this site and having the redirect VirtualHost entry occur first in my httpd.conf file. That works, but I have a better solution now. So we want to tell Apache to respond to any request on any subdomain (that does not already have an existing subdomain entry) and redirect it to photomatt.net. Here’s what I have:
<VirtualHost 64.246.62.114>
DocumentRoot /home/photomat/public_html
BytesLog domlogs/photomatt.net-bytes_log
ServerAlias *.photomatt.net
ServerName www.photomatt.net
CustomLog domlogs/photomatt.net combined
RedirectMatch 301 (.*) http://photomatt.net$1
</VirtualHost>
The two magic lines are the ServerAlias directive which is self explanitory and the RedirectMatch line which redirects all requests to photomatt.net in a permanent manner.
There is a catch though. The redirecting VirtualHost entry must come after any valid subdomain VirtualHost entries you may have, for example I have one for cvs.photomatt.net and I had to move that entry up in the httpd.conf because Apache just moves down that file and uses the first one it comes to that matches, so the wildcard should be last.
That is it, I’m open to comments and suggestions for improvement.
Books to Live By
Jeffrey is in good company:

In the early stages of moving I could only take a handful of books so I chose the ones that I knew I would need for my classes, the ones that I referred to often, and the ones that mean the most to me. The books, from left to right:
- On Writing Well, William Zinsser
- The Journey of the Mind to God, Bonaventure
- MLA Handbook
- Philosophy of Language, William Lycan
- Autobiography of Red, Anne Carson
- Fear and Trembling, Soren Kierkegaard
- Selected Poems, William Wordsworth
- The Republic, Plato
- Designing with Web Standards, Jeffrey Zeldman
- History of the Peloponnesian War, Thucydides
- The Federalist
- The Prince, Niccolo Machiavelli
- Four Plays, Aristophanes
- Bowling Alone, Robert Putnam
- The Anti-Federalist Papers and the Constitutional Convention Debates
- Utilitarianism, J. S. Mill
- The Diamond Age, Neal Stephenson