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

19 lines
474 B
PHP
Raw Permalink Normal View History

<?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()->url();
if ($page->red_type() == 'temp') {
$code = 302;
}else if ($page->red_type() == 'perm') {
$code = 301;
}else {
$code = 302;
}
header::redirect($target, $code);
?>