title: htaccess wordpress https rewrite rule
body: <p>I am hoping that you can help me with the htaccess rewrite rule below.</p>
  
  <pre><code># BEGIN WordPress
  
   # WPhtc: Begin Custom htaccess
   # BEGIN WordPress
   &lt;IfModule mod_rewrite.c&gt;
   RewriteEngine On
  
   RewriteCond %{SERVER_PORT} !^443$
   RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
  
   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>I have recently changed my wordpress site from http to https... The problem is that old url's redirect to the domain name instead of the https version of that page</p>
  
  <p>eg</p>
  
  <p>if I access the following page <code>https://domain.com/test/testing/</code> it works 100%, now if I change the <code>https</code> part to <code>http</code> then the page redirects to <code>https://domain.com</code> instead of to <code>https://domain.com/test/testing/</code> how do I fix it so that if you go to the old version page <code>http://domain.com/test/testing/</code> (the not https version) that it redirects to <code>https://domain.com/test/testing/</code> instead of just the domain name <code>https://domain.com</code></p>