Skip to content

Instantly share code, notes, and snippets.

@HostOnNet
Created February 11, 2017 17:25
Show Gist options
  • Select an option

  • Save HostOnNet/208e566fd50712854b78ca2a2bfcd6b7 to your computer and use it in GitHub Desktop.

Select an option

Save HostOnNet/208e566fd50712854b78ca2a2bfcd6b7 to your computer and use it in GitHub Desktop.
$badUrls = array(
'162.252.83.164',
'ns1.kingashoes.com',
'ns2.kingashoes.com',
'mail.kingashoes.com',
'ftp.kingashoes.com',
'www.images.kingashoes.com'
);
if (in_array($_SERVER['HTTP_HOST'], $badUrls)) {
header("HTTP/1.0 404 Not Found");
echo "<h1>404 Not Found</h1>";
echo "The page that you have requested could not be found.";
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment