$HTTP["host"] =~ "^domainname\.com\.au$" { url.redirect = ( "^/(.*)" => "http://www.domainname.com.au/$1" ) }
$HTTP["host"] =~ "^www\.(.*)" { url.redirect = ( "^/(.*)" => "http://%1/$1" ) }
For Apache and nginx, I have a tutorial on domain www redirection.
http://textsnippets.com/posts/show/1108