31 weeks back pain

I’m 31 weeks and have so much back pain and I’m sore on both legs and getting pressure on my pelvic. When I did the sonogram a week ago they said baby was head up but lastly Iv been feeling him stretch a lot and move a lot and I’m feeling him under my ribs and sometimes down low. I don’t know if I should be concern because I gotten a lot of diarrhea yesterday and horrible pains today as well as nausea and my vagina feels puckered