1

My site is attacking by bots and I want to block them.

[01/Jun/2016:11:02:56 +0200] "GET /index.php?option=com_user&view=register HTTP/1.1" 301 804

i was trying

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

RewriteCond %{QUERY_STRING} index.php?option=com [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>

but its not working, where is the problem?

1 Answer 1

1

Remove the uri from RewriteCond's pattern

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

RewriteCond %{QUERY_STRING} ^option=com [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
Sign up to request clarification or add additional context in comments.

3 Comments

[01/Jun/2016:12:19:33 +0200] "GET /?option=com_k2&view=itemlist&task=user&id=469364 HTTP/1.0" 403 458 bots are getting 403 - thank you !
but weird thing. i logs i see [01/Jun/2016:15:32:23 +0200] "GET /index.php?option=com_user&view=register HTTP/1.1" 301 804 what is wrong?
how it is possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.