Hi,
I created a redirect for some page aliases that I changed.
For example, if somebody goes to www.mysite.com/page I want them redirected to www.mysite.com/page1
I saw a solution on the French forum:
http://forum.cmsmadesimple.org/index.ph ... 135.0.html
So I created a UDT called 301_redirect like so:
Code: Select all
$redirections = array('page/' => '/page1/');
foreach($redirections as $key => $value)
{
if(strpos($_SERVER['REDIRECT_URL'], $key) !== false)
{
header('HTTP/1.1 301 Moved Permanently');
header('Location: '. $value);
}
}
{301_redirect}
However, if I go to www.mysite.com/page I just get the 404 message and no redirection happens.
Any ideas??
Best regards
Ben