Redirect for confirmation cancel button

In the FAQs it talks about redirecting a user after a confirmed appointment to a thank you page when payment is not required. However, the cancel button and the confirm buttons send the user to the same page. How can I distinguish which button in order to tailor the message? Is it possible to redirect the cancel button somewhere else or simply stop it from displaying?