Stay hydrated by drinking at least six glasses of water or other fluids. Keep your underwear clean, and use underwear made of cotton to avoid spreading infection. Always keep your bladder empty as much as possible by peeing regularly. Your doctor may prescribe cranberry juice with antibiotics to treat urinary tract infections.