I have created a symfony2 webpage with a form in a “/new” route. The user posts the input to controller, the controller renders “/create” and If successfully, the final route “/thankyou” is called and a thank you page appears.
I want to disable direct access to /thankyou route that will be accessible only by successful /create POST. This works for /create (why?) but not for /thankyou.
You could add some conditions in your “/Thankyou” action based on referer information:
Or you could use some extra parameters in url as @Florian said.