LoginSignup
1
0

More than 5 years have passed since last update.

特定IPのアクセスユーザの除外(スパムアクセスの除外)

Posted at

微妙な間隔(1分に1回とか)でアクセスしては悪さするロボットがいたのでアクセス拒否した。

.htaccessのRewriteEngine Onの前に

SetEnvIf Remote_Addr "^(999\.999\.999\.999|999\.999\.999\.999)$" denyIPs

order allow,deny
allow from all
deny from env=denyBot

こんな感じでIPをパイプで繋いで複数あるときにも対応しておく。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0