T
T
the_boss2015-02-26 18:02:48
Access rights
the_boss, 2015-02-26 18:02:48

How to block access for a specific request through htaccess?

Hello! Recently, in the Apache logs, there have been entries like

109x195x131x108.static-customer.kurgan.ertelecom.ru - - [25/Feb/2015:20:41:19 +0400] "GET /CF87EEEA-FED0-C04C-B332-1860F6C0DA17/328FA204-8EB5-3A43-BCEE-F071584DE7AE/from HTTP/1.0" 404 6620 "http://yoursite.ru/note/691.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"
109x195x131x108.static-customer.kurgan.ertelecom.ru - - [25/Feb/2015:20:41:28 +0400] "GET /CF87EEEA-FED0-C04C-B332-1860F6C0DA17/328FA204-8EB5-3A43-BCEE-F071584DE7AE/from HTTP/1.0" 404 6605 "http://yoursite.ru/note/691.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"
109x195x131x108.static-customer.kurgan.ertelecom.ru - - [25/Feb/2015:20:41:29 +0400] "GET /CF87EEEA-FED0-C04C-B332-1860F6C0DA17/328FA204-8EB5-3A43-BCEE-F071584DE7AE/from HTTP/1.0" 404 6617 "http://yoursite.ru/note/691.html" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"

The question is, how to block this rubbish through htaccess, so that when a request containing the word /from is present, a ban on access to the page is issued, since the first part of the request (CF87EEEA-FED0-C04C...) is constantly changing? If this can be done through nginx or in some other way, please write. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Belyaev, 2015-02-26
@the_boss

Options +FollowSymLinks
RewriteEngine On RewriteBase
/ RewriteRule
([A-Z0-9]+-[A-Z0-9]+/from)$ - [F] If it's the same, you can get banned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question