Topic : GeoIP

Posted By: golabs on January 22, 2018, 2:14 pm
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:


# 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
RewriteRule ^(.*)$ /bounce/ [L]

Which kinda acts as a 'firewall' to block off anyone not coming from either the United States or Canada.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.