i also tend to get UTIs (almost) every time i have sex. i did low-dose prophylactic antibiotic for a while, which worked great. it's supposed to be hard on your kidneys, though. i discovered later that i could use a cranberry supplement the same way: one pill a day, every day, keeps the UTI away.
i discovered still later (probably 6 or 7 years after i first started having problems) that 2,000mg of vitamin C per day worked, too. the vitamin C makes your urine more acidic (the body can't use that much C all at once, so the rest goes down the drain), and the bacteria can't survive in that environment.
all three methods worked equally well; the vitamin C was the cheapest. i took two 1,000mg tabs, one at breakfast and one at dinner.
for what it's worth, my mom also had a problem with UTIs when she was younger, so whatever the cause, it's probably something i inherited.