See my answer to this M.Y. question.
My follow up question - Are the rules applicable to only a "formal" bet Knesset, i.e. a building established as such? Or is it dependent on the presence of an ark? For example, if one is in a shiva home and there is an ark present there for the week, would one have to walk out sideways?