Manipulate the back button workflow


is it possible to change the workflow for the back button.
I navigate from Page A to B and from B to C. From C it will make a redirect to A.
When I click then to back button in A and the previous page was C it should navigate to D.
Is it possible?

look at register back button action. You can specify what to happen if you tap the back button.