Please i need help to change requested subfolder URL to other one using php not htaccess file.
From stackoverflow.com/folder1/ask
To stackoverflow.com/folder2/ask
is that possible?
update:
I'm working on IP redirect based on geoip mod and bot detected function.
with 3 Magento website (single domain) and two store view with each website.
switch (true)
{ case (bot_detected($bot) === FALSE && $country == "us"):
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'us';
break;
case (bot_detected($bot) === FALSE && $country == "uk"):
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'uk';
break;
default:
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
}
Its working fine but if US visitor click on URL from UK store redirect not applied. So what i need enforce the URL to redirected to US and same with any store conditions.