1
0
Fork 0
web-jbeyerstedt/site/templates/redirect.php

19 lines
484 B
PHP

<?php
// -------------------------------------------
// kirby template FOR jannikbeyerstedt.de
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
// -------------------------------------------
$target = $page->target()->toPage()->url();
if ($page->red_type() == 'temp') {
$code = 302;
}else if ($page->red_type() == 'perm') {
$code = 301;
}else {
$code = 302;
}
header::redirect($target, $code);
?>