So, I'm debugging a PHP repository and I came across the following lines
if (strpos($_SERVER['HTTP_HOST'], 'selfcaredocument.com') !== false)
{
header("Location: https://iammes.care");
exit;
}
Is this used for security, to not allow access to the page from a URL? I don't understand what it does. I'd like to know more, if you can give me a little more information. My understanding of strpos is that it is used to find the occurrence of a string. But what is the real purpose of its usage in the example?