I'm trying to redirect my domain http://www.domain.com to other domain with ssl https://www.domain2.com
I use this code in the index.php:
<?php header("Location: https://www.domain2.com"); ?>
And I get this error: "This web page has a redirect loop". What can be the problem ?. I also try redirecting to javascript.
Thanks.