concrete5 - How do I perform a redirect in Concrete 5.7? -


what's correct way of performing server-side redirect in custom concrete5 code (5.7+)?

i discovered best way:

(new redirectresponse('/url-here'))->send();          // 302 temporary (new redirectresponse('/url-here', 301))->send();     // 301 permanent 

you should able call (almost) anywhere within app , not worry namespaces since has alias in /concrete/config/app.php.


Comments