Right way to redirect with another code than 301

Jakub Bouček
Member | 54

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?

Nette Core | 1191

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