adding redirect and 404 handler