Added redirect support for self signed certs.