If one can not determine the direction of the qiblah
     He should ask one who knows. If he finds no one to ask,    he should try his best to determine it. In such a case,    his prayer will be valid, and he need not repeat it even    though he discovers later on that he had faced in the    wrong direction. If it is made clear to him while he is    praying that he is facing the wrong direction, he need    only turn in the proper direction without stopping his    prayer. This is based on the following incident: Ibn    'Umar reported that the people were praying the morning    prayer in the Quba' mosque when a person came to them and    said, "Allah has revealed some of the Qur'an to the    Prophet in which we have been ordered to face the Ka'bah,    so face it." They immedately turned their faces from    Syria to the Ka'bah." (Related by al-Bukhari and Muslim.)         If one prays according to what he determined and then    wants to make another prayer, he should again try to    determine the qiblah's direction. If it turns out to be    different from what he had determined earlier, he should    pray in the new direction without repeating his earlier    prayer.
    
Two cases in which one doesn't have to face the Ka'bah
     The first one is performing voluntary prayers while    riding (an animal, car and so on). The rider may bend his    head slightly for the bowings and prostrations of the    prayer, but he should bend a little bit lower for the    prostrations. He may face in whatever direction his ride    is going.
         Reported 'Amr ibn Rabi'ah, "I saw the Messenger of Allah,    upon whom be peace, pray while riding, and he faced the    direction in which he was going." This hadith is related    by Muslim, at-Tirmidhi and al-Bukhari. The latter added    that "he bent his head slighty."
         He did not, however, do this for the obligatory prayers.
    Ahmad, Muslim and at-Tirmidhi recorded that he would pray    on his mount while travelling from Makkah to Madinah,    facing away from Makkah. Upon this, Allah revealed,    "Wherever you turn, you will find Allah's face." Says    Ibrahim an-Nakha'i, "They would pray on their mounts and    animals in the direction in which they were facing." Ibn    Hazm comments, "This has been related from the companions    and those of the following generation, during travel and    residence. "         The second case is praying while having to deal with    forced conditions, illness and fear. Under such    circumstances, it is allowed to pray without facing the    qiblah. The Prophet, upon whom be peace, said, "If I    order you to do something, do what you are capable of    doing." Says Allah, "If you go in fear, then (pray)    standing or on your mounts..." (al-Baqarah 239). Ibn    'Umar added, "Facing the qiblah or not facing it."
    (Related by al-Bukhari.)    
Help us build Quranic citations related to this hadith. Get connected with our Contact Us option.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari