mardi 20 septembre 2016

Laravel 5: Use 301 instead of 302

How can I update my Laravel app to use the 301 error code when redirecting instead of the default 302 that Laravel is currently using?

For example, in my routes.php I use the redirect() function to set the error code 301:

return redirect('URL_GOES_HERE/', 301);

But I have many redirects happening in the app. Is there a way to simply change the default 302 to be 301 across all redirects?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire