I would like to see the GeoIP module included into AMPPS as it's great to work with for localization.
Of course - on a localhost you can only test it with some limitations but at least it enables you to test your code to see if it would work at all or not.
It would also allow me to keep my .htaccess the same for both my local dev environment and my online production environments.
The simplest usage for GeoIP is the following:
Code
# include ALL required code including stylesheets and base64 encoded images within bounce.php as external links are not allowed for the visitors who will see the bounce message
RewriteRule ^bounce/?$ /bounce.php [L,END]
# include the ISO3166 codes of the countries you want to *allow* access in the list
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^(US|CA)$
RewriteRule ^(.*)$ /bounce/ [L]
Which kinda acts as a 'firewall' to block off anyone not coming from either the United States or Canada.
|