Halakhah for Berakhot 59:9
היה עומד בח"ל יכוין את לבו כנגד ארץ ישראל שנא' (מלכים א ח, מח) והתפללו אליך דרך ארצם היה עומד בארץ ישראל יכוין את לבו כנגד ירושלים שנאמר (מלכים א ח, מד) והתפללו אל ה' דרך העיר אשר בחרת היה עומד בירושלים יכוין את לבו כנגד בית המקדש שנאמר (דברי הימים ב ו, לב) והתפללו אל הבית הזה היה עומד בבית המקדש יכוין את לבו כנגד בית קדשי הקדשים שנאמר (מלכים א ח, לה) והתפללו אל המקום הזה היה עומד בבית קדשי הקדשים יכוין את לבו כנגד בית הכפורת היה עומד אחורי בית הכפורת יראה עצמו כאילו לפני הכפורת נמצא עומד במזרח מחזיר פניו למערב במערב מחזיר פניו למזרח בדרום מחזיר פניו לצפון בצפון מחזיר פניו לדרום נמצאו כל ישראל מכוונין את לבם למקום אחד
If he is standing outside the [Holy] Land, he must direct his heart towards the land of Israel ; as it is said, "And pray unto Thee toward their land" (ibid. v. 48). If he is standing in the land of Israel, he must direct his heart towards Jerusalem ; as it is said, "And they pray unto the Lord toward the city which Thou hast chosen" (ibid. v. 44). If he is standing in Jerusalem, he must direct his heart towards the Temple ; as it is said, "And pray toward this house" (II Chron. vi. 32). If he is standing in the Temple, he must direct his heart towards the Holy of Holies; as it is said, "And they pray toward this place" (I Kings viii. 35). If he is standing in the Holy of Holies, he must direct his heart towards the mercy-seat. If he is standing behind the mercy-seat, he must imagine himself to be in front of it. Consequently if he is standing in the East, he must turn West ; if in the West, he must turn East ; if in the South, he must turn North ; if in the North, he must turn South. As a result, all Israel will be directing their heart to one spot.