Last active
February 14, 2022 20:07
-
-
Save zero-master/57ce7f5091503ca637747df5ba4fe71d to your computer and use it in GitHub Desktop.
Revisions
-
zero-master revised this gist
May 28, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,6 +40,7 @@ RewriteCond %{ENV:Country} SI RewriteCond %{ENV:Country} ES RewriteCond %{ENV:Country} SE RewriteCond %{ENV:Country} GB RewriteRule ^(.*)$ http://yourwebsite/blockedGDPR/ [R,L] ``` -
zero-master revised this gist
May 28, 2018 . No changes.There are no files selected for viewing
-
zero-master created this gist
May 28, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ Turn on Cloudflare IP Geolocation --- https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do- In your `.htaccess` file: --- ``` 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] ``` Create a file named `index.html` in `blockedGDPR` directory with the below content: --- ``` <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> ```