Navigation Controller replace Page

Hi all,
I have a particular need. I try to explain my problem with an example.

Page A => Page B => Page C

Page A => Page B => Page C => Page D

Page A => Page B => Page D

User complete a task on Page C and He will be redirected to Page D

On Page D I want to enable back button to Page B because Page C is a expired Page

I hope that the problem is clear