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}…

Read this article

Trailing-slashes when reverse proxying with mod_proxy

I often want to mount a node.js single-page web application into a subdirectory of an Apache-hosted website, and the reverse-proxy feature of the Apache module mod_proxy is perfect for this. Getting the forward-slashes at the end of the URL correct is important for successfully loading assets, so this…

Read this article

The standard "Hello World" post

For years (yes, it probably is that long), I'd always intended to set up some sort of blog or ultimately something online where I could post notes about projects I've been working on; sometimes it'd be the solution to a tricky software development problem I'd encountered, or it'd be that…

Read this article