bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

Request redirect() Method like reroute() #1200

Closed dduers closed 4 years ago

dduers commented 4 years ago

Hello community,

There is a reroute() method available which is good, if you don't want to pass a query string. Is there also a redirect() method which can be used when you have a query string? It would be nice to have something alike, otherwise we have to call header('Location; ...') followed by an exit() call each time. Maybe there is a better solution?

Thanks for consideration, Daniel

n0nag0n commented 4 years ago

Does this point you in a positive direction?

https://fatfreeframework.com/3.7/quick-reference#ONREROUTE

ikkez commented 4 years ago

as far as I know, you can use a query string in your reroute url

dduers commented 4 years ago

Thank you, I found that my BEFOREROUTE callback stripped the querystring.