fix http->https redirection