Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Redirect not working #54

Open
sharomet opened this issue Feb 3, 2017 · 1 comment
Open

Redirect not working #54

sharomet opened this issue Feb 3, 2017 · 1 comment

Comments

@sharomet
Copy link

sharomet commented Feb 3, 2017

Hi.
I have a problem.
Why does not it work redirect?

$app = new \Slim\App();
$app->get('/', function ($request, $response, $args) {
return $response->withRedirect($this->router->pathFor('name'));//not work
});

$app->get('/auth/signup', function ($request, $response, $args) {
return 'Hello';
})->setName('name');

$app -> run();

or


$app->get('/', function ($req, $res, $args) {
  return $res->withStatus(302)->withHeader('Location', '/auth/signup'); //Not work
});

Thanks!,

@sharomet
Copy link
Author

sharomet commented Feb 4, 2017

Problem to the Unicode. I have file utf-8, a should be utf-8 no bom

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant