The page isn’t redirecting properly was given when redirecting

The question has been asked by many people. I have tried following solutions so far and non of them are working for me. Can anyone help me with this. Thank you in advance.
method 1

header("Location: http://www.local.abc.com/xyz");exit;

method 2

echo "<script>window.location.href='http://www.local.abc.com/xyz';</script>";

method 3

wp_redirect('http://www.local.abc.com/xyz', 301 );
exit;

Read more here: The page isn’t redirecting properly was given when redirecting

Leave a Reply

Your email address will not be published. Required fields are marked *