Fix http redirection