Use misdirection to prevent detect magic from revealing the trick.

I am absodamnlutely certain there's a 3.X spell that makes an item seem locked when it's not and vice versa, but I couldn't find it with twenty minutes of searching.

Get a 2nd-ed chaos mage to come in and top it off with a there/not there spell. So you walk right through the space where a door doesn't exist for you, turn around, and suddenly a hella trapped door has sprung into existence ...

I also like the 3rd-party illusion spell that covers something real with the impression of being illusory. "Oh, that's clearly not actually a dire crocodile, you can tell from the--" CHOMP. (Reverse illusion, Relics&Rituals page 101.)