Handles redirections.