Added alternative for HTTPS redirect: using a custom location parameter.