I am hoping that you can help me with the htaccess rewrite rule below.

```
# BEGIN WordPress

 # WPhtc: Begin Custom htaccess
 # BEGIN WordPress
 <IfModule mod_rewrite.c>
 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]
 </IfModule>

 # END WordPress

```

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

eg

if I access the following page `https://domain.com/test/testing/` it works 100%, now if I change the `https` part to `http` then the page redirects to `https://domain.com` instead of to `https://domain.com/test/testing/` how do I fix it so that if you go to the old version page `http://domain.com/test/testing/` (the not https version) that it redirects to `https://domain.com/test/testing/` instead of just the domain name `https://domain.com`