Euphoria-MVC Immediate Redirect
- Posted by euphoric (admin) Jul 25, 2019
- 1018 views
I'm attempting to use a redirect when a user attempts to access a path that doesn't exist.
return redirect( url_for("index"), response )
How do I make it an immediate redirect to that page, instead of showing a page with a link?
As an example use-case, say someone fills out a login form, and the credentials are no good. If the user reloads that page, it will attempt to submit the form again. So, on a failed POST, I want to send the user back to the GET version.
If there's another way to do this, please let me know! Like, should I just render_template() at that point? OK, can't use render_template() because it doesn't change the URL. The user could just keep attempting to reload the unavailable URL.
ADDED: Here's a link on how a redirect could be done in PHP.