do_client_redirect: fix history handling