Howto::SSLRedirect: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Introduction == CS Hosting uses SSL off loading (handled by the load balancers), so the apache service does not know if the end user is using SSL or not. Standard apache S...") |
(No difference)
|
Latest revision as of 08:19, 4 August 2015
Introduction
CS Hosting uses SSL off loading (handled by the load balancers), so the apache service does not know if the end user is using SSL or not. Standard apache SSL redirection won't work, and will usually lead to an infinite loop.
.htaccess
Add the following the your .htaccess file to make the page automatically redirect to SSL.
RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]