I had absolutely awful rib pain on my right side at exactly 27 weeks, for some stupid reason I struggled to work and someone there actually drove to the hospital. They gave me blood tests and monitored me etc but found no reason for it except normal stretching etc. It was a killer, moving didn't help and I couldn't seem to sit or lie any way at all. The only thing that helped a little was the odd paracetemol and a hot water bottle I found helped a lot with rest.
I really feel for you- I just wanted to cry with it, particularly when trying to get to sleep with it.
At 33 weeks I had the same pains though not quite so severe on my left, I stayed off work and did the paracetemol/hot water bottle thing and again after a day or two it went- Also don't know if it was coincidence or not but after a particularly severe night I woke up with stretchmarks previously not there! Honest!
Hope it eases for you. If you are worried or concerned at all do phone your midwife asap.
xxxxx