I wanted to know that ,
1- women are not allowed to pray in the masjids, than why are they allowed to pray at Masjid-e-Haram and Masjid-e-Nabwi (s.a.w)?
2-on what conditions is a woman allowed to pray in a masjid?
According to the light of Ahadith, it is more virtuous for women, to perform Namaz at home rather than performing in the Masjid. It was from Masjid un Nabi that Hazrat A’isha , Hazrat Umar and many of companions (may Allah be pleased with them) had prevented women from going to perform Namaz. Therefore, upon this basis and due to the fear of temptation(Fitnah), women are generally not encouraged to leave their homes to perform Namaz in any masjid. However, the permission for women to enter Haram is for the purpose of performing Tawaaf (circumambulation).