How to redirect to a website using PHP?

As through
header('Location: /');
redirect to a link with an anchor: mysite.com/#message

is there any alternatives how can I do that?
June 10th 19 at 16:13
1 answer
June 10th 19 at 16:15
header('Location: http://mysite.com/#message');
To specify http or https

Other varianty via js
window.location = "http://mysite.com/#message";

Using html and tag meta
<meta http-equiv="refresh" content="0;http://mysite.com/#message">

Find more questions by tags PHP