Created
November 5, 2019 20:28
-
-
Save jbd91/9e063ac56d63431795d14635304069bf to your computer and use it in GitHub Desktop.
Black List IPs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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