removed dupe code for http/https redirects