Hi, I have some annoying bandwidth hogger that has compromised a number of computers and sends about 5-10 requests per second to my web server. There is one way to identify these requests as they always end with the url /error like in: /en/error /de/error /de/schulung/error I have checked online and found various scenarios but I am unable to find a working RewriteCond that would match and send traffic back to caller. Can someone help out on this? I need a match to any request where the url ends in /error "GET /de/schulung/grundlagen/error HTTP/1.1" Thanks a million
This will do the trick: RewriteEngine On RewriteBase / RewriteRule ^(.*)error$ - [F,L] Code (markup): However, it will not deny /de/error/, for example, just anything with error at the end. If you need it with the trailing slash then just add it after error and before the $.
Thanks for the simple reply - this indeed did the trick... was actually simpler than I thought, got lost in all the RegEx stuff of Apache....
No problem, mate. I know the feeling... sometimes it seems daunting, especially with RegEx. If you need any further help, don't hesitate to ask. Totally emphasise with you about the situation - had similar in the past.