0
votes

I need to redirect a http page to a https and make it hidden, like:

http://www.example1.com -> https://www.example2.com

So example1 is always visible in the URL bar, and example2 is hidden.

Will something like this work? If not, what should I change?

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.html
RewriteRule ^index.html https://www.example2.com [L]
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
1

1 Answers