Help with Rewrite Rule and Geoip - Ban a page from coutries
I'm trying to redirect users from some countries from the registration page to a specific page using mod_geoip, but something is wrong because is not redirecting:
<ifmodule mod_geoip.c="">RewriteEngine on
RewriteCond %{QUERY_STRING} ^app=core&module=global§ion=register$
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(A|B!C)$
RewriteRule ^(.*)$ http://www.domain.com/page/manual-registration.html [L]</ifmodule>
Can this be placed anywhere in vhosts or it need to be inside
Should I use FilesMatch instead (if it works … I didn't test) or this does not work with query strings?
<filesmatch "^index.php?app="core&module=global&section=register><quot;">RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(A|B!C)$
RewriteRule ^(.*)$ http://www.domain.com/page/manual-registration.html [L]</filesmatch>
If you have better options I would like to know.
Thanks
Note: (A|B|C) are fake country codes, the GeoIP.dat is loaded and ON