Right way to redirect with another code than 301

Jakub Bouček
Member | 54
+
+1
-

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?

Felix
Nette Core | 1183
+
0
-

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

https://api.nette.org/…ter.php.html#…