Roll up your carpet and take it outside as quickly as possible. If the carpet is water logged and too heavy to lift, prop it up on sawhorses or other objects. Aim fans above and below the carpet to help it dry. Take the carpet outside once it has dried to the point it is light enough to lift. Throw away the padding that was underneath the carpet
Place the carpet on a surface such as a patio. A sloped surface, such as many driveways, is best because the water will drain off the carpet when you wash and rinse it.
Use a hose to completely rinse off the carpet. Start at one end of the carpet and rinse in one direction to force the dirt contaminated water off the carpet. Turn the carpet over and rinse the bottom side in one direction.
Pour a carpet disinfectant on the carpet. Pine-based cleaners and all-purpose liquid ammonia are recommended. Allow the disinfectant to soak into the carpet for at least 5 minutes. Rinse off the carpet until all the foam from the cleaner is gone.
Mix a solution consisting of 2 tbsp. of bleach for 1 gallon of water. Test the solution on a small part of the carpet to see if it changes the color of the carpet. If the carpet remains unchanged, sponge the entire solution onto the carpet. Allow the solution to soak into the carpet for 5 minutes. Rinse off the carpet. The solution with bleach will remove odors from the carpet and stop the potential growth of mold.
Remove as much water as you can with a wet/dry vacuum. Expose the carpet to as much sunshine as you can. Make sure both sides of the carpet are dry before you take it back inside.