isAuth(); if($pageInfo['restricted'] && !$userAuth){ header('location:/login/'); } if($pageInfo['redirect_login'] && $userAuth){ header('location:/account/'); } }else{ http_response_code(404); header('location:/404'); die('Not found'); } ?>