Correct 404 redirect in getTemplatePage