Knowledgebase
How can I test for HTTPS in a Rewrite Rule?
In order to test if a connection is being made using SSL encryption you need to use the HTTPS environment variable. This will either be "on" if the request is made over HTTPS or it will be undefined if it is made over HTTP. Other methods to test for HTTPS may fail on our server architecture. This is an example rewrite rule that will redirect all requests made over HTTP to the HTTPS URL: RewriteEngine On RewriteCond %{ENV:HTTPS} !=on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Also Read
-
Why is my secure site not showing the padlock in the browser? (Views: 4430)
-
I have ordered an SSL certificate or I have renewed my SSL certificate, but it does not look to be active (Views: 4596)
-
Why doesn't my SSL certificate appear valid in old versions of Internet Explorer? (Views: 4659)
-
I have bought a secure certificate (SSL) with you, how do I add a GlobalSign smart seal image verifier? (Views: 7723)
-
I have bought a secure certificate (SSL) with you, how do I know it has been installed correctly? (Views: 4630)