If you live in a snowy climate, chances are that family and visitors may be tracking salt into your home on the bottoms of their boots. Of course, the first line of defense is to ask everyone to take their shoes off in your entry. But what if your entry rug, or other carpeted space in your home, gets stained with the salt?
Just use a bit of distilled white vinegar and a scrub brush. Scrub gently, making sure to use a moderate (though not overly generous — you don't want a ton of splashing) amount of vinegar. Rub it in and then blot it with a dish towel. This also works well for carpeting in cars! Source