Feature/api rewrites

Update the vhost template to include the required re-writes for the REST API
@alistairstead @blongden are we happy to merge this or it's superseded?