Okay, I've mostly solved it...
With the above, the url cleanly redirects to index.php with the variables easily accessible. The obvious problem being that EVERYTHING gets redirected, and I need to ignore certain files.
I made a simple regex to ignore .png etc, but with the mod_rewrite then any image in the site with a relative path eg img/pic.png is being rewritten to http://site.com/a/b/c/img/pic.png rather than http://site.com/img/pic.png
I can solve this by adding / to the start of images, but this is a bit counter-intuitive as I'd have to remember to do it every time: that's fine for now while it's just me working on it, but in 6 months I'll forget that and be scratching my head again.
I've come up with the following which is "nearly there". It works if the url is site.com/ or site.com/a but not if it goes any further eg site.com/a/ or site.com/a/b. Can anybody spot where I'm going wrong?
^(/.*/)*(/.*\.(png|css|jpg|jpeg|gif|js)+)$
I think what I need to do is use regex to split it into three sections, but 2 is turning out to be tricky
1) /a/b/c/d/e/....ad infinitum
2) = /img/ subfolder (possibly optional, things can be in root)
3) = file.png
My other option is to write some PHP functions for images in order to remove anything after the base site path and write the URL there - ie get the location of /site/index.php, strip anything after site/ and add image.png after that. The problem here is as before, in 6 months I'll forget that I have to use the function.