Yep, killer headaches when I'm constipated. No over-the-counter pain relievers seem to help, either. Same as you, as soon as I'm back on track and things are moving again, the headache quickly disappears.
When this first happened to me, I spoke to my family doc and my GI specialist, and they both looked at me as if I'd pulled my head off and sat it on the table. They both told me there's no correlation, but I find lots of info about the correlation between the two issues on the Net. I mean, I do trust two good, different docs -- one being a specialist, too -- more than the Internet, but you're the second person I've come across who has the headaches, too. One would think docs would at least be aware of this.
Anyway, no, you're not alone
As long as I eat right, plenty of fiber, lots of water, daily walks, and keep the constipation at bay, I don't get the headaches, either.