Sunan an-Nasa'i, Volume 1, Book 8, Hadith 727 (DarusSalam)

It was narrated that Tariq bin 'Abdullah Al-Muharibi said: 'When you are praying, do not spit to the front or to your right. Spit behind you or to your left if there is no one there, otherwise do this.' And he spat beneath his foot and rubbed it.'"

أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ سُفْيَانَ، قَالَ حَدَّثَنِي مَنْصُورٌ، عَنْ رِبْعِيٍّ، عَنْ طَارِقِ بْنِ عَبْدِ اللَّهِ الْمُحَارِبِيِّ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِذَا كُنْتَ تُصَلِّي فَلاَ تَبْزُقَنَّ بَيْنَ يَدَيْكَ وَلاَ عَنْ يَمِينِكَ وَابْصُقْ خَلْفَكَ أَوْ تِلْقَاءَ شِمَالِكَ إِنْ كَانَ فَارِغًا وَإِلاَّ فَهَكَذَا ‏" ‏ ‏.‏ وَبَزَقَ تَحْتَ رِجْلِهِ وَدَلَكَهُ ‏.‏

sunnah.com