Overlooking Qiblah is one of several legal requirements for prayer. The mecca of Muslims during prayer is the Kabah at the Grand Mosque, Mecca, Saudi Arabia.
One’s prayer is declared invalid if it does not face the Qibla. Unless the person is in a state of war or on a vehicle.
However, it often happens when someone is in a foreign place, so do not know the direction of qibla when going to pray. When in this condition, what to do?
Quoted from the rubric of Shariah Nahdlatul Ulama, facing the Qiblah is set as a requirement for the prayer. This is like the explanation of Imam Abu Ishak Ibrahim bin Ali Yusuf Al Fairuzzabadi Al Syairazi in the book Al Muhadzdzab fi Fiqh Al Imam Al Syafi’i.
“Overlooking the Qiblah is a legitimate requirement of prayer except in two conditions, ie when conditions are very dangerous (war raging) and sunna prayers are done on the way.”
If he does not know the direction of Qibla, Imam Abu Ishak gives the following explanation.
“If he is in the temple (Masjidil Haram), then it is obligatory for him to face ‘ain Qibla … If he is not in it, then first seen, if he knows the direction of Qiblah, then prayers facing that direction, if there is a trusted who tells it, then accept the news and no longer need to be of any kind … if he sees a group of Muslims at a place of prayer facing a direction, then he does not need ijtihad, because it is like a news.If there is nothing, then look first, if he is the one who can capture the omen, while his condition is far from Mecca, he should be ijtihad searching the direction of Qiblah using the method can be from seeing the sun, moon, stars, or wind direction blowing … then it is obligatory for him to be of the same kind as the pious altogether to address the latest fiqih issue.