All adages about crying over spilled milk aside, that moo juice you just discovered on your living room rug isn't exactly a laughing matter, either. There's more than one way to deal with the unpleasant odor -- but the first order of business is to clean up as much of the offending liquid or, if it has been there for a while, solid matter as possible. When you're doing this, keep in mind that using certain cleansing agents may hasten the chemical processes producing the rancid odor and make matters worse.
Blot up as much of the milk as you can, using paper towels. Don't rub the area; just dab it, press down and let the milk soak into the towel.
Make a solution containing 2 cups of warm water and 1 teaspoon of dish detergent. Soak the area with this solution, using a sponge.
Cover the affected area with baking soda, and then mist it with water, using a spray bottle. Leave the baking soda there until the area dries. The baking soda may turn yellow as it soaks up any residue you weren't able to clean off.
Vacuum up the baking soda. Brush the rug with a scrub brush, and vacuum again. Repeat until all the powder is gone.
Spray lemon juice on the affected area if it's still stained. Leave the lemon juice for 15 minutes, and then wash it with water and blot the area with paper towels.