tried to deal with redirect and https, failed