With thanks to nordisch.org darix and MrWerewolf
I've been wrestling with a planned migration to lighttpd for a few days now, on the whole I've found it much easier than apache to configure something that works, and for the most part have done it much faster than the last time I had to configure Apache from scratch. The big sticking point was Drupal sites with an embedded gallery2.
I think I've cracked it using some rewrites and the magnet approach, I'm not sure if I've got the lua script right, actually, i'm pretty sure it's not matching the case I had to code some extra re-writes for. If anyone can spot where I've gone wrong I'll love them forever (or at least send them coffee).
Update: After feeding myself more coffee, I fixed it, see #typo below.