I have read two hadith of Rasool (saw). In one he says not to stop women from offering namaz in masjid (mafhoom). In another hadees, he says that the best namaaz of women is inside the deepest corner of her house (mafhoom). Though he encouraged women to pray at their home he never stopped any lady from praying in Masjid. It was only during Khilafat of Umar (ra) that some incident happened in masjid that he barred women from coming to masjid for namaaz. When the ladies complained to Mother Ayesha (ra) regarding this, Mother Ayesha (ra) replied that had Rasool (saw) seen what you people do in masjid he would have done the same thing. Please explain the two apparently conflicting hadees, the incident that led to the decision of Umar (ra). I am a Hanafi, wanted to know about this for my personal knowledge. I totally support decision of Umar (ra), surely he knew of Rasool (saw) mansha better. Someone told me that this incident is also mentioned in Hayaatus Sahaba.
بسم الله الرحمن الرحيم
The Hadith dealing with the salah of women in mosque is related to a time when women were free from the corruption of casting unwanted looks, while the narration from Hadhrat Umar (RA) related to a time when this thing started in mosques. Some rulings change as per the situation. Therefore, both the narrations are alright as per their age and time, there is no contradiction between the two.
Allah knows Best!
Darul Uloom Deoband