NASAI-KUBRA 11206:
from Sālim b. ʿAbdullāh from his father —
When the Prophet ﷺ passed by (a place called) Al Hijr, he said, "Do not enter the house of those who were unjust to themselves, unless (you enter) weeping, lest you should suffer the same punishment as was inflicted upon them." After that he covered his face with his sheet cloth while he was on the camel-saddle. (Using translation from Bukhārī 3380)
الكبرى للنسائي ١١٢٠٦:
عن سالم بن عبد الله عن أبيه —
أَنَّ النَّبِيَّ ﷺ لَمَّا مَرَّ بِالْحِجْرِ قَالَ «لَا تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلَّا أَنْ تَكُونُوا بَاكِينَ أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ» وَتَقَنَّعَ بِرِدَائِهِ وَهُوَ عَلَى الرَّحْلِ
hadithunlocked.com