title: Convert a full wordpress site to HTTPS
body: <p>I'm trying to get a wordpress site to HTTPS, but everything I try gives me a redirect loop. I've edited the htaccess, I've set it in PHP, I've even downloaded a wordpress plugin to convert it, but every method gives me a redirect loop error. I know that something has to be redirecting my https to http, but I don't know what. Here is my .htaccess file without any of the HTTPS settings in it:</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>And here's the PHP I'm trying to use in the header php file to conver the page to HTTPS:</p>
  
  <pre><code>if($_SERVER["HTTPS"] != "on")
  {
  header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
  exit();
  }
  </code></pre>