How to create separate routing for the same URL?

I created a website that, when the user correctly fills out the form, is redirected to the confirmation page with the URL mySite.com \ A \ confirm .

I want to be able to redirect the user to another page. If he enters this url " mySite.com \ A \ confirm "

What is the best way to achieve this (I was hoping for something more elegant than each user's state)

+5
source share
3 answers

Possible simple solutions:

  • cookie, . cookie , ( , Crypto.encryptAES(String), Crypto.decryptAES(String) .
  • , submit : (secureParameter); .
  • POST GET
  • , URL- .
+4

- mySite.com\A\confirm

, -. -, , .

+2

, .

, Play 303 HTTP-, GET URL-. , , .

, Idempotence GET. , .

It is better to add a check on the same page, and if the form has not been submitted, simply show the message or throw a 404 error (not found).

+2
source

All Articles