Uw opmerkingen

$http_cf_visitor is registered only on Coudflare. On any common nginx you can do like this:


if ($scheme = http) {
  return 301 https://$server_name$request_uri;
}

Works for me like a charm.