Question
How ban some http-query in Apache?
Hello.
I have a problem - some application sends too many queries to my API (works by http). I have forbidden it in php and in .htaccess:
RewriteCond %{QUERY_STRING} apikey=23e8a4dccbcfae76f73292fd5cc13f84 [NC]
RewriteRule ^.*$ - [F,L])
But it doesn’t help. So my apache2/access.log has very-very big size and it leads to the lack of free space on server.
Can I ban this query in Apache and how can I do it?
UPDATE.
Queries are sent from the different ip-addresses and rarely (from one ip), so banning them by IP or by time limit won’t help…
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×