I have searched an .htaccess that redirects all the traffic from an Old Site to a New one (including HTTPS) but I have not found it.
Actually I have this:
RewriteEngine on
# First rule - if this is an SSL connection, then redirect
# to http://example.com then stop processing other rules
RewriteCond %{HTTPS} on
RewriteRule (.*) http://www.OldDomain.com/$1 [R=301,L]
# Second rule - all other requests, redirect to http://newdomain.com.
RewriteRule (.*) https://www.NewDomain.com/$1 [R=301,L]
And this one works perfect for these situations:
http://OldDomain.com/ > https://www.NewDomain.com/
http://OldDomain.com/internal/ > https://www.NewDomain.com/internal/
http://www.OldDomain.com/ > https://www.NewDomain.com/
http://www.OldDomain.com/internal/ > https://www.NewDomain.com/internal/
https://OldDomain.com/ > https://www.NewDomain.com/
https://www.OldDomain.com/ > https://www.NewDomain.com/
But these situations with HTTPS don't:
https://OldDomain.com/internal/
https://www.OldDomain.com/internal/
What I have missing in my .htaccess?
Thanks