I have two domains loaded in my Plesk websites and domains section, the two domains are without www, so let´s say the two domains are:
example.com
example.es
When I redirect from example.es
to example.com
it is done but with http, not with https.
So, I decided to edit my .htaccess
file with the follwing instructions:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
But my page is not loaded properly, because seeing the web inspector it creates an infinite loop of requests to my main page example.com
.
Anyone knows some kind of solutions?