https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do-
RewriteEngine on
# Set the CF-IPCountry header value as "Country" variable
SetEnvIf CF-IPCountry "(.*)$" Country=$1
RewriteCond %{ENV:Country} AT
RewriteCond %{ENV:Country} BE
RewriteCond %{ENV:Country} BG
RewriteCond %{ENV:Country} CY
RewriteCond %{ENV:Country} CZ
RewriteCond %{ENV:Country} DK
RewriteCond %{ENV:Country} EE
RewriteCond %{ENV:Country} FI
RewriteCond %{ENV:Country} FR
RewriteCond %{ENV:Country} DE
RewriteCond %{ENV:Country} GR
RewriteCond %{ENV:Country} HU
RewriteCond %{ENV:Country} HR
RewriteCond %{ENV:Country} IE
RewriteCond %{ENV:Country} IT
RewriteCond %{ENV:Country} LV
RewriteCond %{ENV:Country} LT
RewriteCond %{ENV:Country} LU
RewriteCond %{ENV:Country} MT
RewriteCond %{ENV:Country} NL
RewriteCond %{ENV:Country} PL
RewriteCond %{ENV:Country} PT
RewriteCond %{ENV:Country} RO
RewriteCond %{ENV:Country} SK
RewriteCond %{ENV:Country} SI
RewriteCond %{ENV:Country} ES
RewriteCond %{ENV:Country} SE
RewriteCond %{ENV:Country} GB
RewriteRule ^(.*)$ http://yourwebsite/blockedGDPR/ [R,L]
<html>
<title>
GDPR Block
</title>
<body>
We are unable to bear GDPR compliance cost at the moment.
</body>
<style>
body {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
margin-top: 20px;
}
</style>
</html>