Skip to content

Instantly share code, notes, and snippets.

@jbd91
Created November 5, 2019 20:28
Show Gist options
  • Save jbd91/9e063ac56d63431795d14635304069bf to your computer and use it in GitHub Desktop.
Save jbd91/9e063ac56d63431795d14635304069bf to your computer and use it in GitHub Desktop.
Black List IPs
<?php
//wp-config
$blocked_IPs = array(
'93.160.60.22',
'188.213.49.139'
);
if (in_array($_SERVER['REMOTE_ADDR'], $blocked_IPs)) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: https://www.youtube.com/watch?v=dQw4w9WgXcQ');
exit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment