Fix up redirecting when there's only one MP

Need to add the HTTP status code. Also matched path with PHP app. And
add a check to make sure we find an MP in our database.