I've heard that you can't travel to the US 6 months before your visa expires. Is that true? Or does that only apply to 6 months until the expiration of the passport? (Or does it apply to neither?)
I haven't heard or come across a rule which requires you have six months or more validity on a US visa to be allowed in. As the US Department of State website explains:
What I believe you are talking about is the minimum validity of your passport that is required. From the London office website of US Embassy:
Which means that if your country is listed among the ones in the PDF document, having less than six months validity of your passport will not be an issue. Additionally, other websites mention a minimum of 90 days validity is required for your passport (although this might be specific to if you're entering under the visa waiver programme) but the London office of US Embassy site states that is okay, and will only limit your stay period to whatever date your passport expires.
However, the New Delhi website of US Embassy implies you do need to get your passport renewed if it will be valid for less than six months from the time you enter.
Your situation, then, will vary depending on what residency status you hold in a country as well as your citizenship.
No, this is definitely not true. I've had many friends travel to the States with less than 6 months to go on their visa expiration date. Also noted on the site is that the visa is valid up until the date it's set to expire. http://travel.state.gov/visa/temp/info/info_1298.html