route('GET', '/', 'home'); $R->route('GET', '/login', 'login'); $R->route('GET', '/signup', 'signup'); } if($LOGGEDIN) { $R->route('GET', '/', 'beer_get'); $R->route('GET', '/beer/add', 'beer_add'); $R->route('GET', '/beer/get/{id}', 'beer_get'); $R->route('GET', '/review/add', 'review_add'); $R->route('POST', '/contact/send', 'contact'); } if(!$LOGGEDIN && $R->getUrl() == '/') { // show login page } //$R = null; ?>