Quick snippet: redirecting requests with a missing www. in Apache
Getting www. prepended to requests to alexsilcock.net using mod_rewrite sometimes feels like voodoo, and in the past I've managed to get it partially working but with unexplained infinite redirect loops. To save experimenting with it in the future, here's the easiest way of accomplishing it: RewriteCond %{HTTP_HOST}…