Automatic redirect
philips81 opened this issue · comments
MM commented
Hi, when I log into the site
"http://myproject.it/" I would like the automatic redirect to the page "http://myproject.it/login" or "http://myproject.it/home", if the login has already been done or not,, but I don't understand which rule to use.
I use:
$router->before('GET|POST', '/.*', function() {
if (checksessionlogin()) {
go to home
}else{
go to login
}
});
Thanks
MM commented
Hi,
thanks for the reply, but i can't access the rule.
It is completely ignored, but if I use "http://myproject.it/page", the rule is used.
thanks