1. If one comes to pray the Amidah, and is unable to ensure that when standing he is facing towards Eretz Yisrael or Yerushalayim (e.g. if he is travelling), he should at least turn his face towards the direction of Eretz Yisrael, Yerushalayim and the Temple. If he is unable to do this, He should imagine with his heart that he is standing in the Holy of Holies. (Shulchan Aruch and Mishne Berurah 94)
2. One who erred and commenced praying while facing in a different direction, and realized his mistake while in the middle of praying, should not move his feet to get into the correct position. Instead, he should move his face towards the direction of Eretz Yisrael, Yerushalayim and the Temple. If he is unable to do this, he should imagine with his heart as if he is standing in the Holy of Holies. (ibid)

