次のスニペットを使用して、IPアドレスの配列をリダイレクトしています。許可されていないアレイにIPアドレスの範囲/ブロック全体を追加するにはどうすればよいのでしょうか...
<?php // Let's redirect certain IP addresses to a "Page Not Found"
$disallowed = array("76.105.99.106");
$ip = $_SERVER['REMOTE_ADDR'];
if(in_array($ip, $disallowed)) {
header("Location: http://google.com");
exit;
}
?>
「76.105.99。*」、「76.105.99」、「76.105.99.0-76.105.99.255」を運が悪かったので使ってみました。
他の理由で、mod_rewriteや.htaccessではなくPHPを使用する必要があります。