One of the joys pre-doggie door was that we got A LOT of flies in our house from leaving the back door ajar so Vinnie could go out as he pleased. Leaving the door open was great for potty training because he learned quickly that he could just go out when he wanted and didn't have to wait for us to notice he had to go. But like I said, lots of flies got in.
The trick was getting the hole small enough for the flies to get in but not get back out. I ended up just putting a piece of tape over most of the hole and that seemed to work. In the blogpost she says to take the jar outside and let the flies go free. I am not so nice. I don't really want them coming back into the house and with a compost container on the shelf next to the sink there are always more fruit flies to replace them. Try it out. It totally works for eliminating pesky fruit flies. I'm not so sure I want to know what kind of bait to use for regular flies...for now the fly swatter will do.