I redeveloped my company's website and I'm having some issues with redirecting / SSL
Typing or clicking on http://olddomain.org redirects just fine to https://newdomain.com. However, typing or clicking on the link https://olddomain.org does not redirect to https://newdomain.com and I get this error:
Firefox does not trust this site because it uses a certificate that is not valid for olddomain.org. The certificate is only valid for the following names: *.newdomain.com, newdomain.com
Is there some rewrite conditions I can put in my .htaccess file to fix this? Or is this an issue with the way that I set up the SSL certificate for the new domain?
Here's what I've tried so far:
<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 / http://newdomain.com/
</IfModule>
<br />
and
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?http://olddomain\.org$
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,QSA,L]
Or is this an issue with the way that I set up the SSL certificate for the new domain?
Yes, you need a valid SSL cert that covers the old domain (as indicated in the browser error... "it uses a certificate that is not valid for olddomain.org").
Without the valid cert the browser cannot connect (securely) to olddomain.org so never even sees the redirect directives.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With