一些駭客常用的 蜘蛛程式讀取網站中的網頁
制止的方法
RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot.*
RewriteCond %{REMOTE_ADDR} ^123.45.67.[8?9]$
RewriteRule ^/not/to/be/indexed/by/robots/.+ - [F]
它有兩組條件
if (HTTP_USER_AGENT of the robot matches a pateern \"NameOfBadRobot\")
and (REMOTE_ADDR of the requesting host is 123.45.67.8 to 123.45.67.9)
then now substitution but send a HTTP \"Forbidden\" hdader (starus code 403)
endif
這就是蜘蛛的user-agent 表頭必須符合 , 而且p位址也要致 , 才會成為受拒的對象
.上面的條件指出多個ip位址比對的可能性
|