Occasional pain under right rib cage??

Katie
Hey ladies :) I went to the hospital a little over a week ago with occasional pain under my right rib cage and ended up having a UTI and bacterial infection.. They said the pain could be from that but honestly.. I don't think so. The pain subsided for several days but started again yesterday. It's nothing I can't handle but I'm just wondering if it's normal? Thankfully, I do know it's not preeclampsia related as all was good when I went to the hospital :) im 27 weeks.