You can prevent getting another UTI with the following tips:
Empty your bladder frequently as soon as you feel the need to go; don't rush, and be sure you've emptied your bladder completely.
Wipe from front to back.
Drink lots of water.
Choose showers over baths.
Stay away from feminine hygiene sprays, scented douches, and scented bath products - they'll only increase irritation.
Cleanse your genital area before sex.
Urinate after sex to flush away any bacteria that may have entered your urethra.
If you use a diaphragm, non-lubricated condoms, or spermicidal jelly for birth control, consider switching to another method. Diaphragms can increase bacteria growth, while non-lubricated condoms and spermicides can cause irritation. All can make UTI symptoms more likely.
Keep your genital area dry by wearing cotton underwear and loose-fitting clothes. Avoid tight jeans and nylon underwear - they can trap moisture, creating the perfect environment for bacteria growth.