Sexual intercourse can cause irritation to the urethra, making UTIs more likely. Rougher sex and rear-entry positions tend to put more pressure on the urinary tract. Pee right before and right after sex - it may help prevent UTIs. Using the diaphragm method of birth control may make you more susceptible to UTIs. If you tend to get UTIs, it might be smart to try another method.
Some people also find that spermicides irritate the urethra and promote UTIs.
Don't contaminate your urinary tract with bacteria from your anus - wipe from front to back. Avoid tight fitting clothes that rub or put pressure on the genital area. Avoid trauma to the genitals when doing activities like horseback riding or cycling. Avoid bubble baths. Some people find that drinking unsweetened cranberry juice helps prevent UTIs.