|One of various ways to do this:
Use a dynamically created web page for the page that you do not want to be directy accessed.
Page 1 = daPage01.html
Page 2 = [does not exist except in the database]
User goes to Page 2 : Oh wait! There is no Page 2. That page is still in the database.
User goes to Page 1.
There is no link to Page 2.
User does what YOU want them to do on Page 1.
Page 2 is created dynamically with a changable name. Exmaple: daPage12E13F4576496587G5447868764K5P7q84578_02.html
Page 2 is then added to Page 1 for that user to click on and to go to.
Later that user goes to Page 2 via that link. Oh wait! When they were detected of having closed or left Page 1 and *also* closed or left Page 2 then Page 2 was removed from the system. There is no Page 2 for them.