I had a fruit fly infestation for two summers and I tried everything. I'll list everything I did and how it worked. The important thing to remember is that once you have the infestation, it will get worse, so the sooner you deal with it, the better.
First, go through your house and kitchen and find any spills or open food containers where they could be breeding. We had a closed metal breadbox with bread in it on the refrigerator that we forgot about and I opened it one day and it was full of flies in various parts of the life cycle. Fruit flies feed and breed on any decaying organic material-- even an exploded ketchup packet in the back of the cupboard.
Vinegar doesn't kill fruit flies. It's what they eat. It does attract them, so you can make really good fruitfly traps using a jar with vinegar in the bottom and a cone-shaped piece of paper like a funnel so they can get in and not out. These traps really work well for catching adults while you're dealing with finding where they are breeding.
Bleach down the drains sometimes works, but you're better off getting a commercial-strength organic digester for your drains and garbage disposal. Most of the time, the flies breed in the drains where there is decaying organic material. You really want to use something made especially to get rid of that organic material to get rid of the flies. Bleach doesn't work all that well.
Keep all of your trash either outside or sealed-- and by sealed I don't mean just a trashcan with a lid. The best thing to do is to clean up all of your food waste after you eat and immediately put it outside. This also means not letting dirty dishes stay in the sink for any length of time. Don't leave foodstuffs anywhere in the house. I remember finding fruitflies in my bedroom because I had a habit of drinking tea at night and the cups would sit a day or two.
This spray worked very well for killing the little fuckers, though, like the traps, it didn't take care of the infestation:
Ortho® Home Defense® Indoor Insect Killer : The Scotts Miracle-Gro Company : Product General : The Scotts Miracle-Gro Company :
If you bring fresh produce into the house, wash it with lukewarm water and a brush. Keep everything you can stored in the refrigerator. When produce starts to rot, pitch it.
That's all I can think of right now, but if I think of more I'll write more. Fruit fly infestations can get nasty, so take care of it now before it becomes a huge problem.