You will find 2 different websites by 50 percent sites ..path/siteA/ and ..path/siteB/ . I have to load one of these on domain example.com based on their country they're going to from.

It cannot be www.example.com/siteA it should be www.example.com .

Could it be posible?

Edit: found the answer.

Configure Your webserver to pay attention on two different ports, one pourt should serve content from /path/siteA and also the second one from /path/siteB.

Next thing would be to configure Pound based on the position of the user (IP geolocalisation) and You are on the way

It is almost always completed with geo-location.

You utilize a redirect on example.com/index.php that redirects to example.com/pathA or example.com/pathB based on their ip

make use of the header() function to redirect :)


$ip = $_SERVER['REMOTE_ADDR'];

if(...) // check location of IP
{
  header("Location: /pathA");
}
else
{
  header("Location: /pathB");
}

http://php.net/manual/en/reserved.variables.server.php
http://au.php.net/manual/en/function.header.php


Edit: According to comment, this is exactly what you'll need: http://stackoverflow.com/questions/1391685/mod-rewrite-filter-specific-pages-by-ip-and-redirect-them

Yes it's possible. First pages you need to request the word what or show the default language.

This is accomplished by two techniques:

  1. Each language could be lines or words designated in individually files with every variables. Using the variable calling we are able to the obtain the language parameter.

  2. Each language could be lines or words designated in database with individually table.