Eu redireciono para "home" e depois deteta se estiver em "home", ele carrega o template, porem o script redireciona mas não está a conseguir carregar o template
<?php
if (!isset($_GET['page'])) {
header('Location: home');
exit();
}
switch ($_GET['page']) {
case 'pro/home':
$page = getTemplate('teste.tpl', array('user'=>$user));
echo $page;
break;
}
function getTemplate($name, $in = null) {
extract($in);
ob_start();
include "template/" . $name;
$text = ob_get_clean();
return $text;
}
?>