I use this plugin with OnWebPagePrerender event to redirect visitors from www.promosound.org to promosound.org (that is for iframe to work properly)
$hst = "promosound.org";
if ($_SERVER['HTTP_HOST']!=$hst)
{
$modx->sendRedirect('http://'.$hst.'/');
}
now id like to redirect visitors from pages like promosound.org/artists or .../contacts (wich actually are displayed in iframe) to promosound.org again, for them not to get onto crappy pages.
I though Id add some strings:
$hst = "promosound.org";
if ($_SERVER['HTTP_HOST']!=$hst || $_SERVER['REQUEST_URI']!="")
{
$modx->sendRedirect('http://'.$hst.'/');
}
But this leads to ’infinite loop’ or something and fails to load any pages (with any url typed).
Anybody has any ideas on how to redirect from modx pages that are not start page?
(oops..I guess I answered my own question...anyways advice would be appreciated)