This can also be caused by kidney stones. If you haven't gone to the doctor yet, it would be a good idea so that they can do a urinalysis. This will be the best way to decide how to treat your symptoms. I recently thought I had a uti and was surprised to find out that I had no infection, it was kidney stones. With either, drinking plenty of fluids, and avoiding caffeine and other diuretics is a good rule to follow.
That is still symptoms of a UTI so best to get to the doctor and get some antibiotics. Just make sure you're drinking plenty of water and/or cranberry juice as well and try flush it out your system along with the meds.