For more details see the GeoIP Redirect extension page.
With GeoIP Redirect extension, you can automatically identify customers' location and offer them a proper content: e.g. currency and language. Redirect customers to any relevant information, considering their place of residence.
The module requires GeoIP database to be installed in order to detect users' location. Please go to System → Configuration → Amasty Extensions → Geo IP Data.
You can get the databases automatically or import your own data.
Hit the Download and Import button to make the extension download the updated CSV dump file and import it into your database automatically.
To import the files from your own source, use the Import option. Path to the files should look like this (the part 'var/amasty' should be replaced with your folders’ names):
var/amasty/geoip/GeoLite2-City-Blocks-IPv4.csv var/amasty/geoip/GeoLite2-City-Blocks-IPv6.csv var/amasty/geoip/GeoLite2-City-Locations-en.csv
If you face any issues when importing the database, please take a look at this section to find the solution.
To enable GeoIP Redirect extension, go to System → Configuration → Amasty Extensions → GeoIP Redirect and set up Yes in this field.
Choose which URLs you want to redirect and select appropriate option in the dropdown.
User Agents to Ignore Indicate which user agents you want to ignore. Popular search engines are ignored by default (e.g. googlebot, yahoo, msnbot)
To enable redirect to particular Store View according to user’s country set up Yes in this field.
Enable Country –> URL. To redirect to particular URL according to user’s country, set up Yes in this field. Select required URL Mapping for each country.
Sometimes, it is unable to complete the database import due to execution time limit of PHP scripts. You can avoid this error by increasing the maximum execution time for your PHP scripts.
You need to set the max_execution_time to the number of seconds that all your scripts are allowed to run in your PHP's configuration file. The file location may differ from system to system but in general you need to find the PHP.INI file and modify it.
We need to set the value to 18000.
; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI max_execution_time = 18000
Setting the value to 0 means there's no time limit.
You'll have to restart your web server for this solution to work.