As of now I use this rule (in .htaccess of example.com) to redirect HTTPS/HTTP example.com to newdomain.com:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
And from searching, I found that the following rule redirects HTTPS to HTTP:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
How do I combine these, so that - - https://example.com
redirects to http://example.com
and then, http://example.com
redirects to http://newdomain.com
.
I cannot explain why I am not asking for something like this - - HTTPS/ redirects to http://newdomain.com. In short, I have searched and asked, and the rules suggested aren't working, probably coz I am using a self-signed cert, and the same cert for the two domains (example.com is an addon domain, and newdomain.com is the main domain). Please advise, if that makes sense.