more redirect fixes for HTTPS

more redirect fixes for HTTPS