My right side hurta during sex

When he's deep inside me, I have pain that goes up into my stomach.. it doesn't hurt when we are doing it missionary or when laying on my side or stomach.. just when my legs are on his shoulders.. iv never had this with anyone else.. what could it be?