Redirect To Domain Before SSL Is Read
- by Devin Dixon
I had to switch servers and I want to redirect all SSL urls to the non-ssl site. The problem I am running into is the https site still throws invalid certificate error even through apache has the redirect implemented.
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot /data/sites/www.example.com/main/
RewriteEngine on
Redirect 301 / http://www.example.com
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/www.examplecom/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/httpd/ssl/www.example.com/ssl-cert-snakeoil.key
ServerName www.example.com
ErrorLog "logs/example.com-error_log"
CustomLog "logs/example.com-access_log" common
</VirtualHost>
My question is, how can I do a redirect and avoid the invalid ssl certifcation error in the browser?