Is $_SERVER[‘REQUEST_SCHEME’] reliable?
The REQUEST_SCHEME environment variable is documented on the Apache mod_rewrite page. However, it didn’t become available until Apache 2.4. I only have Apache 2.2 so I created an environment variable. I added the following to the top of my .htaccess file. RewriteEngine on # Set REQUEST_SCHEME (standard environment variable in Apache 2.4) RewriteCond %{HTTPS} off … Read more