Latest from Twitter: There is a dragonfly outside my window. It is taunting me for not bringing my camera to work.
 

Wordpress and Lighttpd Clean URLs

When dealing with clean URLs it usually means some complex regex for each and every single type of content. When using lighttpd and wordpress there is a much simplifier solution, 404 rewrites. All you need to do is add an error handler to your lighttpd.conf and a single line of php  to your theme.

The first step is to add the following to lighttpd.conf for the domain:

server.error-handler-404 = “/index.php?error=404″

The next step is to make sure your actual 404 page gives the 404 error. In your templates 404.php you need to add the following to the top of the file:

 <?php header(”HTTP/1.1 404 Not Found”); ?>

Once you get these two settings in place you will be able to set the custom permalinks to whatever you would like.