Domain redirecting to domain with ssl

0

I am facing a problem, we have a main domain that has SSL installed and we have a variation of this domain, which I registered to help when searching for the website. >

We use nginx , in%% of Digital Ocean.

I made the note by the ocean digital, and it works ok, when typing the address X it goes into my droplet, however it does not change to the address Y (which has SSL ) and error security, says the X address has an invalid certificate.

Sorry if it got a bit confusing, what I need to do is, type the X address and it will redirect to the Y address.

Can anyone help me?

    
asked by anonymous 26.05.2015 / 02:57

1 answer

-1

Tried to redirect through .htaccess?

redirect 301 http://siteX.com.br https://siteY.com.br

And if you want to change the entire domain, so as not to lose the strength of the links pointing to the site, or visitor. Do as follows:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://siteY.com.br/$1 [R=301,L]
    
24.02.2017 / 00:46