I have built a site that when a user fills in a form correctly he is redirected to a confirmation page that has the url mySite.com\A\confirmation.
I want to be able to redirect the user to a different page If he enters that url "mySite.com\A\confirmation" himself
What is the best way of achieving this (i was hoping something more elegant then keeping state of each user)
The answer to this question lies in the app/conf/routes configuration file. Play's router translates HTTP requests into action calls.
The router is the component in charge of translating incoming HTTP Requests into action calls (a static, public method of a Controller).
The routing file is a VSAM key-sequenced data set that contains information to route each data set to its LPD printer queue. You need one routing file entry (VSAM record) for each printer being used at the installation.
The routes file syntax conf/routes is the configuration file used by the router. This file lists all of the routes needed by the application. Each route consists of an HTTP method and URI pattern, both associated with a call to an Action generator.
Possible simple solutions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With