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

19 lines
484 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
// -------------------------------------------
2021-01-24 17:11:31 +00:00
$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);
?>