Hadithcore
Mishkat al-Masabih, 1544

Abu Musa reported God’s messenger as saying, “When a man is ill or on a journey, what he was accustomed to do when staying at home and well will be recorded for him.”(This refers to his observance of <i>salat</i>, etc., cf. the traditions of ‘Abdallah b. 'Amr and Anas on p. 326.) Bukhari transmitted it.

وَعَنْ أَبِي مُوسَى قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا مَرِضَ الْعَبْدُ أَوْ سَافَرَ كُتِبَ لَهُ بِمِثْلِ مَا كَانَ يعْمل مُقيما صَحِيحا» رَوَاهُ البُخَارِيّ

References1 variant
In-Book Reference
Book 5, Hadith 22