Slight Pain Upon Urination and during Intercourse

Patient: After sitting for a very prolonged period of time and unable to go to the restroom (job related) it felt like my bladder would explode when I finally got to go. That night my inner thighs, lower legs and bottom hurt as if I had been sitting on them too long. Anyway, the next day I noticed a slight pain upon urination. Very slight and just for a second. A week later I went to the doctor and told him everything above and also stated that I had been drinking too much coffee. He tested for an infection and did a digital rectal exam (DRE). Both appeared normal and said that it might be an irritation in the urethral lining and gave me phenazopyrid to help ease the pain upon urination. He said it might be non-bacterial prostatitis but since the prostate felt normal and there was no pain upon his examination he tended to think otherwise. Since the pain was so slight I haven’t bothered taking it (the phenazopyrid). But I did notice some palpitations in my prostate that night (possibly from the DRE). No pain just palpitations. Anyway, I noticed that if I held the penis a certain way there would be no pain upon urination and so for the next few days I had absolutely no pain. Then on Friday I noticed a short but sharp pain upon getting an erection which disappeared only to return two or three times in short periods during intercourse. After shifting positions I managed to ejaculate with no pain at all. Yesterday there was no pain. This morning the pain upon urination returned as did a pain near the prostate just prior to passing gas. I also have a little pain near the inner thigh (which could be due to exercise) and sometimes a slight dull pain in the pelvic area on both sides of the penis. I have no discharge and a wife of 28 years so no STD. There is no foul odor in my urine or cloudy urine. No blood upon urination and no fever. Just a brief slight pain when I urinate and sometimes a pain near my prostate when I sit down too long and sometimes prior to passing gas. Any ideas on home treatments or whether I should go back to the doctor? I hope it will just go away on its own.

Symptoms: Pain upon urination