fixes #319 - make page api send proper redirects

This works via spot-check, but I'm really starting to think we should write some tests for the API code. Not sure I trust myself to start it myself without some feedback here.