Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Micro application. Redirect is not working.

https://gist.github.com/mrspartak/790eddb6619aff75634b

So this code is not redirecting when I access to / path. Is there any thoughts about why?



34.6k
Accepted
answer
edited Mar '14

@Assorium try, micro Always return if response

$app->before(function() use ($app) {
if($app->session->has("logged_in") !== true) {
return $app->response->redirect("/login");
//return false;
}