Enough people here have recommended the following that I finally tried it this year, even though it didn't seem likely to work... and you know what, it did a pretty good job after all! I would not say it completely exterminated every last fruit fly from the house, nothing will do that except wintertime and a lack of fresh fruit

, but it did an excellent job on a pretty significant infestation.
Take a cheap disposable plastic bottle, I used a couple bottles from the bottled water that sometimes get tracked home from kids' events where they're being given out. Put about 3/4" of apple cider vinegar, and 3/4" of honey, and a small squirt of dish soap in there. Screw the cap on. Poke a few smallish holes in the bottle's sides, about halfway up -- ideally poke the holes with the point of closed scissors or something, so the hole sort of flares inward and is easy for fruit flies to get in, but harder for them to find again and escape.
I hung a couple of these traps in the kitchen -- one by the trashcan, one by the bananas and fruit bowl, and one by the shelves where I put large baskets of fruit waiting for me to do something with it. For a few days, you will see flies start to appear floating in the liquid in the traps but there will still be lots flying around and you won't think the traps are doing anything. But they are -- the flies that get caught in there are not breeding and not making more flies, and as time goes by more and more flies will accumulate in the traps.
I also keep some fruit at the other end of the house, which (until and unless you get an infestation going *there*, too) gives some protection, as fruit flies are not usually major long-distance fliers.
Good luck, have fun,
Pat