Use abort(404) for error pages (instead of redirect("/404")