my ribs hurt so much.

It feels as if the baby is pushing up against my ribs, it hurts so much I cannot sit or lay down in any way without feeling uncomfortable. It hurts so much the pain is going to my back. What do I do? I'm 31 weeks. This pain is really bad.