Hi there,
we are using MODX as a multidomain setup. Therefor, we use the good old gateway plugin, which basically looks like this:
if ($modx->context->get('key') != 'mgr') {
//grab the current domain from the http_host option
switch ($modx->getOption('http_host')) {
case SERVER_DE:
$modx->switchContext('de');
$modx->setOption('site_url', $protocol . SERVER_DE . '/');
$modx->setOption('cultureKey', 'de');
$modx->setOption('site_start', 6);
$modx->setOption('error_page', 298);
break;
case SERVER_FR:
$modx->switchContext('fr');
$modx->setOption('site_url', $protocol . SERVER_FR . '/');
$modx->setOption('cultureKey', 'fr');
$modx->setOption('site_start', 7);
$modx->setOption('error_page', 301);
break;
Now, we want to add tracking parameters to our root domain, say example.com/?trackingId=098098
However, MODX will redirect to example.com/ and all tracking parameters are lost. This does not happen on subpages like example.com/sample.html?trackingId=009808.
We supposed that it is the gateway plugin, specifially the setOption('site_start'). If MODX sees that the request URI is what is set as site_start, then it will redirect to the alias of the resource. Is that correct, and if so, is it possible to preserve any GET-Parameters?