What is the ruling for facing the imam face-to-face?

Prayer in, Around, and on the Roof of the Kaaba