send redirect for not found when asking for html, but 404 code otherwise