My application runs on an ubuntu server which sits behind cloudflare. I want to redirect requests for example.com/admin
to show 404 if the visitor is not coming from my IP 123.1.2.3
I tried this I also tried using
RewriteCond %{HTTP:CF-CONNECTING-IP} !^(123\.1\.2\.3)$
RewriteRule ^admin.php - [R=404,L]
But none of them worked.
I have installed mod_cloudflare