Hi
I would like to use white-list to block most of the countries on some of my websites.
On apache I would use cloudflare and .htaccess for this. I'm sure this can be done on OLS too but I couldn't get it working.
.htaccess on apache:
original link
That would block everything except US and CA.
I tried to modify it for OLS but couldn't get it working.
Any ideas?
I would like to use white-list to block most of the countries on some of my websites.
On apache I would use cloudflare and .htaccess for this. I'm sure this can be done on OLS too but I couldn't get it working.
.htaccess on apache:
Code:
<FilesMatch "wp-login.php">
RewriteEngine on
RewriteCond %{HTTP:CF-IPCOUNTRY} !^(US|CA)$
RewriteRule ^ - [F,L]
</FilesMatch>
That would block everything except US and CA.
I tried to modify it for OLS but couldn't get it working.
Any ideas?