According to the folklore, Shri Ram had come to this place to meet Rishi Pandit Acharya. A Sanskrit school was owned by Pt. Acharya. Shri Ram had worshipped Lord Shiva at this place, hence it is called Rameshwar temple.
Valmiki Ramayana 3/69/1 to 9 Manas 3/32/2.