One-Way Entrance

"And consider this dismaying observation: this chamber has no windows, and no doors. Which offers you this chilling challenge: to find a way out"

- Haunted Mansion ride

If the protagonists go into a haunted building, there is a non-zero chance that while their back is turned the walls and doors will turn into hole-less walls, leaving the unfortunate protagonists trapped inside. A less supernatural variant is for the doors to slam shut behind them and refuse to open.

See also: Locked in a Room and It Was Here, I Swear

Live-Action Television

 * In Buffy the Vampire Slayer episode, Fear Itself, Anya arrives at the Halloween Party. But she can't enter because the front door disappears!

Amusement Park Rides

 * This is part of the story of The Haunted Mansion Disney ride.

Video Games

 * The Evil Within 2: When Sebastian enters a new hallway, the blood stained door vanishes!
 * In Layers of Fear, Episode 3, behind of the doors will be a wall that has a chain, but another door disappears.

Western Animation

 * Samurai Jack and the Haunted House.
 * Doug: While at a haunted house ride the floor in one of the rooms, the floor recedes into the walls.

Other Media

 * The creepypasta, The Door Game, has the front door disappearing and replaced by a wall, which one of the players points out.

Films

 * The Winchester movie, will have doors shutting by themselves and whatnot. Since it's based on an actual haunted house.
 * Paranormal Activity, the open bedroom door where our heroes are sleeping in slams shut. Micah jumps out of bed yelling "F***!"
 * In Stay Alive, when Miller goes to the basement, the door slams shut and separates him from his friends.

Western Animation

 * In Gravity Falls episode The Inconveniencing, the doors slam shut after the group tries to leave.
 * In The Magic School Bus episode, aptly named "In the Haunted House", the door to the Sound Museum slammed shut after when all of the class went inside the mansion.

Video Games

 * Wales Interactive's indie game, Don't Knock Twice, uses this trope as part of a game mechanic, where the doors closes when the player has fully inspected rooms and leaves them.
 * In DreadOut the door slams shut on the player, the only way out is to find the key.
 * In one room of the catacombs at King's Quest VI, the two doors slam shut and the ceiling starts to descend on Prince Alexander, until the puzzle is solved.
 * In Yomawari: Midnight Shadows, when Yui awakens in a crumbling building as she tries to exit a room, the door closes.

Real Life

 * H.H. Holmes's "Murder Castle," which not only has this trope happens, secret passages, fake walls, and hidden rooms, which are all design to kill his guests.

Tabletop Games

 * Considering you can't just leave through the front door of Betrayal at House on the Hill, and the genre, this trope is in play.

Video Games

 * The Witcher 3's Doors Slamming Shut, one of Geraldt's contracts has an haunted old mansion. Where if Gerald enters the house, the latter starts to shake and are among other things.