Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:28:22

And when he directed himself toward Madyan, he said, "Perhaps my Lord will guide me to the sound way."  

And when he turned his face towards Midian, in the direction thereof — and this ˹Midian˺ was the town of ˹the prophet˺ Shu‘ayb, eight day’s journeying from Egypt, ˹so˺ named after Midian son of Abraham; he ˹Moses˺ did not know the route to it — he said, ‘Perhaps my Lord will show me the right way’, that is to say, which route to follow, in other words, the simplest route to it. God thus sent forth to him an angel with a goat, which he ˹Moses˺ set off following towards it ˹the town˺.
القرآن:٢٨:٢٢

وَلَمَّا تَوَجَّهَ تِلْقَاءَ مَدْيَنَ قَالَ عَسَىٰ رَبِّي أَنْ يَهْدِيَنِي سَوَاءَ السَّبِيلِ  

{ولما توجه} قصد بوجهه {تلقاء مدين} جهتها وهي قرية شعيب مسيرة ثمانية أيام من مصر سميت بمدين بن إبراهيم ولم يكن يعرف طريقها {قال عسى ربي أن يهديني سواء السبيل} أي قصد الطريق الوسط إليها فأرسل الله ملكاً بيده عنزة فانطلق به إليها.