jodysingh786 Posted July 23, 2013 Share Posted July 23, 2013 I am trying to restrict access to my shop from a particular country. I downloaded the geo.dat file given in the BO in geolocation. I extracted it and uploaded it to the location mentioned. Lastly I unchecked the country from the list of countries given in geolocation. But it is not working. Coz the country to be restricted is the one where I am currently based. Kindly help please. Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted July 23, 2013 Share Posted July 23, 2013 http://www.ip2location.com/free/visitor-blocker create .ht access 1 Link to comment Share on other sites More sharing options...
jodysingh786 Posted July 23, 2013 Author Share Posted July 23, 2013 (edited) ya I've got the code. I pasted it in the .htaccess file and saved it. Nothing happens...? Edited July 23, 2013 by jodysingh786 (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted July 23, 2013 Share Posted July 23, 2013 what is the ip address you are testing from? I will test this from my test system and output the factored country to see if resolving using the GeoLite.dat 1 Link to comment Share on other sites More sharing options...
jodysingh786 Posted July 24, 2013 Author Share Posted July 24, 2013 101.63.13.31 is my ip address. Sorry for responding late. Quite eager to have this working so your help is much appreciated. Link to comment Share on other sites More sharing options...
El Patron Posted July 25, 2013 Share Posted July 25, 2013 I tested that IP address and it returns 'IN' country code which is correct. When you set up your geolocation what did you set the following to? http://screencast.com/t/v1NICZNikMIf Link to comment Share on other sites More sharing options...
jodysingh786 Posted July 27, 2013 Author Share Posted July 27, 2013 Hi - I had set up as this: For restricted countries - Cannot see my catalogue; For other countries - All options are available. Well after downloading the geoip file and placing it in tools/geoip/directory. But it shows the message: Geolocation database is unavailable. Please guide me with the steps to be done to successfully setup this module Link to comment Share on other sites More sharing options...
El Patron Posted July 27, 2013 Share Posted July 27, 2013 that is the correct process other than make sure unzip the GeoCityLite.dat.gz before ftping to tools/geoip/(GeoCityLite.dat) Link to comment Share on other sites More sharing options...
AngelSpeedy Posted July 29, 2013 Share Posted July 29, 2013 Hi, i have 1.4.9.0 version and in my case the whitelist not work, when i try to insert one ip to give permission to see my store, he dont stay in the box after saving, the box is always empty, any suggestion to fix this ? Tks.. Link to comment Share on other sites More sharing options...
El Patron Posted December 6, 2013 Share Posted December 6, 2013 Please note: most issues testing with Geo Localization.. you must 'clear your browser cookie for your shop, or all cookies) prior to starting a test and when changing countries you are testkng with. Otherwise PrestaShop will use what is in the existing country. currency/language/country etc. for anyone that is into localization and wants to save loads of time, here is a 'very' reasonably priced PrestaShop module that simulates a visitors view of your shop by 'country' or 'ip'. http://www.prestashop.com/forums/topic/279119-module-geo-targeting-localization-country-or-ip-simulator-pro/ happy localizing Link to comment Share on other sites More sharing options...
Guest locen Posted December 18, 2015 Share Posted December 18, 2015 Hi, I should also block all IP addresses of a particular nation, how can I do?I should also block all IP addresses of a particular nation, how can I do? Link to comment Share on other sites More sharing options...
sinnights Posted January 8, 2016 Share Posted January 8, 2016 (edited) Hi, I should also block all IP addresses of a particular nation, how can I do?I should also block all IP addresses of a particular nation, how can I do? Download Country's IP and copy all IP's - http://www.ip2location.com Open .htaccess file At last of .htaccess file Add a line (Last means Last and do not write anywhere between the other code else it will not gonna workkk ! ) ErrorDocument 404 /Error404.html Paste all the restricted IP's from provided Website... deny from 1.38.0.0/15 deny from 1.186.0.0/15 deny from 5.56.18.0/24 etc etc .. it can me 1000+ Save your .htaccess File Create another Error404.html file in your root folder (it may be plain text or you can modify its content so that user will get nice Error Page for Unauthorized access) If you have any problem you can write me Cheersssssssssssss !!!! BEST Place to Live in : 127.0.0.1 Edited January 8, 2016 by sinnights (see edit history) Link to comment Share on other sites More sharing options...
sinnights Posted January 8, 2016 Share Posted January 8, 2016 ya I've got the code. I pasted it in the .htaccess file and saved it. Nothing happens...? you just Need to add extra file in your Root Directory - anyfilename.html Open .htaccess Write a line at last - do not write anywhere else it will not gonna work ! ErrorDocument 404 /anyfilename.html All IP's range of addresses which you copy from Internet Save and check your website... :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: .......with the help of PROXY Link to comment Share on other sites More sharing options...
Recommended Posts