(4) باب جَوَازِ صَلاَةِ النَّافِلَةِ عَلَى الدَّابَّةِ فِي السَّفَرِ حَيْثُ تَوَجَّهَتْ
'Abdullah b. Dinar reported on the authority of Ibn 'Umar that the Messenger of Allah (ﷺ) used to observe prayer on his ride (no matter) in which direction it had its face turned. 'Abdullah b. Dinar said that Ibn 'Umar used to do like that.
Reference: Sahih Muslim 700 g
In-book reference: Book 6, Hadith 47
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1503