Answer the question
In order to leave comments, you need to log in
.htaccess cloudflare?
How to allow access only to certain .htaccess ips, when you access the site through cloudflare, it sees the cloudflare ip and does not see the real ip, so access can be opened either to everyone or closed to everyone.
Site on ukraine hosting
Answer the question
In order to leave comments, you need to log in
Cloudflare passes the client's ip in the CF-Connecting-IP header.
If Apache version >= 2.4
Require expr "req_novary('CF-Connecting-IP') -ipmatch '1.2.3.0/24' "
Require expr "req_novary('CF-Connecting-IP') -ipmatch '7.7.7.7' "
RewriteEngine On
RewriteCond %{HTTP:CF-Connecting-IP} !^1\.2\.3
RewriteCond %{HTTP:CF-Connecting-IP} !=7.7.7.7
RewriteRule ^ - [R=403,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question