Forum Moderators: phranque
some flood robot attacking my search.php as following.
81.215.69.190 - - [01/Feb/2005:06:45:44 -0600] "POST /search.php?mode=results HTTP/1.0" 200 10323 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)"
is it possible to forbidden this kind of requests with htaccess if referer is not from our site (just for search.php)
if method POST and
if referer blank and (I don't know exactly above log's referer is empty)
if page is search.php AND (in root folder)
if QUERY_STRING contains "mode=results"
then
forbidden
Thanks in advance. If i can implement this most of my problems will be gone.
While we don't write code on demand here, the following may help. See the references cited in our charter [webmasterworld.com] for more information, and browse through the threads in this forum for more examples. Do not install code on your server that you don't understand; It may cause problems that you won't be able to fix, and do harm to your search engine rankings.
> if method POST
RewriteCond %{HTTP_METHOD} ^POST$
> and if referer blank
RewriteCond %{HTTP_REFERER} ^$
> and (I don't know exactly above log's referer is empty)
Sorry, this is not clear...
> if QUERY_STRING contains "mode=results"
RewriteCond %{QUERY_STRING} mode=results
> if page is search.php AND (in root folder)
RewriteRule ^search\.php$
> then forbidden
- [F]
Jim