Another sign is that this punishment was for those who lived in the city, who were well aware of the respect of the Masjid Nabawi. If any Masjid was meant there, then the people of Taif would not be exempted as Masjid were present in Taif as well.
Imam Qazi Iyaz (May Allah shower His mercy on him) writes about the respect of presenting oneself before the Holy Prophet (Sallallahu alaihi wa sallam):
Translation: The way being respectful and honoring the Holy Prophet (Sallallahu alaihi wa sallam) was compulsory before the passing away of the Holy Prophet (Sallallahu alaihi wa sallam), it is similarly compulsory way after the passing away of the Holy Prophet (Sallallahu alaihi wa sallam) into the presence of Allah. It is Wajib on every person who has Iman that whenever he or she hears the mention of the Holy Prophet (Sallallahu alaihi wa sallam) or himself makes a mention, to express utmost devotion and be respectful in actions and deeds and to honor Him as per the instruction of Allah, because he or she is in the presence of the Holy Prophet (Sallallahu alaihi wa sallam). Imam Qazi Iyaz (May Allah shower His mercy on him) says that this has been the practice of our Pious Predecessors and our great Imams.
In Madina, the visitors should be mindful of the respect of the Masjid Nabawi and should not do anything which even has a shadow of disrespect.
We pray to Allah that for the sake of the Holy Prophet (Sallallahu alaihi wa sallam) to let us all have the honor of going to Madina and present oneself to the Holy Prophet (Sallallahu alaihi wa sallam) with absolute respect. May we die in that sacred city and be buried in Jannatul Baq‘ee.
***** the end *****