switch ($_COOKIE['market']) {
case "tampa":
$url = $_SERVER['REQUEST_URI'];
switch (true) {
case strstr($url, 'packages'):
$currenturl = str_replace('/packages','/tampa/packages/',$url);
header("Location: ".$currenturl);
echo $modx->sendRedirect($currenturl, array('type' => 'REDIRECT_HEADER'));
break;
}
break;
// etc for other markets
}echo $modx->sendRedirect("/tampa/packages/", array('type' => 'REDIRECT_HEADER'));This question has been answered by BobRay. See the first response.