Did the Prophet (PBUH) Discourage Women’s Visits to Mosque?

Nowadays, women should be encouraged to go to the Mosque since this brings about the objectives behind existence of Mosques in Islam, which is remembering Allah, acquiring knowledge, acquainting with other Muslim women who frequent the Mosque and participating in public activities in a way that benefits the woman, her family, her community and her religion.