two methods for doing http->https redirect