Right way to redirect with another code than 301

3 years ago

Jakub Bouček
Backer | 51

From v3.0 is deprecated call $this->reditect(301, 'target'); and is recommended using redirectPermanent() method.

Nette\Application\UI\Component::redirect() first parameter $code is deprecated; use redirectPermanent() for 301 redirect.

Without code is redirect() trying to decide right code.

But I want to send code 307. What is right way to send it?

2 years ago

Nette Core | 1034

You should use $presenter->redirectUrl($url, $code) method.