Loading


Advertisement:

Author Topic: How to redirect user based on location.  (Read 107 times)

group

  • Newbie
  • *
  • Posts: 25
How to redirect user based on location.
« on: March 16, 2017, 03:57:36 pm »
I have users from 3 countries and i want to have separate (file/theme) for each country and redirect them based on their location (but maintain the same database)
Can i create 3 different file in sub-domains or directory file, and make user land in their respective sub-domain or directory files based on their location ?

Anyone with idea please.

fog

  • Hero Member
  • *****
  • Posts: 896
Re: How to redirect user based on location.
« Reply #1 on: March 17, 2017, 01:46:18 am »
You can create and use subdomains, each one with a different country in a different installation, and using the same database for each one.

Regards

soumikr

  • Newbie
  • *
  • Posts: 20
Re: How to redirect user based on location.
« Reply #2 on: March 17, 2017, 12:53:32 pm »
ya that multisite funtion you can do like this

make a subdomain *.domain.com

and in config.php add this
define('WEB_PATH', 'http://'.$_SERVER['HTTP_HOST'].'/');

after that go to admin panel setting>advance and chose you preferable option

group

  • Newbie
  • *
  • Posts: 25
Re: How to redirect user based on location.
« Reply #3 on: March 17, 2017, 11:29:05 pm »
Thank you fog and soumikr for your response.

But soumikr, can you please explain further on what exactly to be done.
Thanks.

group

  • Newbie
  • *
  • Posts: 25
Re: How to redirect user based on location.
« Reply #4 on: March 21, 2017, 07:14:42 pm »
Good day everyone
Kindly assist (probably for the last time).

based on my request .
Primary domain is country 1 = example.com
country 2 = example.com/country2
country 3 = example.com/country3

Now when example.com is accessed from any country, program should check if location is country 2 or 3 then decided which site to load according to location. Else { country 1}

how can i make this happen and use one database for all.
Installation of osclass sometimes require installing another databse when i try to put another osclass in a directory file after having one installed in main domain.

lealesspain

  • Newbie
  • *
  • Posts: 3
Re: How to redirect user based on location.
« Reply #5 on: March 22, 2017, 10:47:01 pm »
Hi,

just search "Osclass Geo Location Redirection Plugin" on google or Osclass forums then you will find your solution..

Thanks