Added 404 redirection functionality