WebSite X5Help Center

 
Michel M.
Michel M.
User

Site restrictions  en

Autor: Michel M.
Besucht 1154, Followers 1, Geteilt 0  

Dear Sirs

Looking to get help plese.

As we are whoesaler serve only London , is there any way to restrect clients of purchase if they are outside london?

Hope to get help soon as it's realy an important matter

Kind regards

Gepostet am
2 ANTWORTEN - 2 NüTZLICH
Claudio D.
Claudio D.
Moderator
Nutzer des Monats IT

I hope you are on linux host...
if yes, you can do it by putting in the htaccess on your host
of instructions to allow only people from London to visit your site or your store folders , only.
everyone else you block them .
Or , better yet, with all pages in php,
you always redirect based on the visitor's IP ...
take a cue from here:
https://stackoverflow.com/questions/29088644/php-redirect-based-on-ip-addresses

Mehr lesen
Gepostet am von Claudio D.
Stiac Engineering
Stiac Engineering
User

Interesting topic!

If instead of PHP you wanted to use JavaScript, you could use code that actually takes advantage of geographic location if you wanted, using actual GPS data you could use this code https://www.gebher.com/blog/index.php?redirect-based-on-geolocation

The operation is approximately simple, i.e. if the user is not within a kilometer radius, modifiable by us and from the headquarters of our business, he is redirected to an alert page to inform him appropriately.

I hope it can be useful.

Mehr lesen
Gepostet am von Stiac Engineering