D
D
Dextor232021-07-02 11:23:15
Apache HTTP Server
Dextor23, 2021-07-02 11:23:15

How to correctly allow access in htaccess by http_User_Agent?

I'm trying to resolve it in .htaccess like this, but it doesn't work, I still can't get through.

RewriteCond %{http_User_Agent} "!^Mozilla/5\.0 \(compatible; Cloudflare/\d+"

Here's what's in the server logs

172.70.5.199 - - [02/Jul/2021:10:51:12 +0300] "GET / HTTP/1.1" 500 240 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/85.0.4183.121 Safari/537.36 (compatible; Cloudflare SpeedTest/1.0; + https:// blog.cloudflare.com/new-speed-page/ )"

How to spell correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question