Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
The Mihrab is a building to which a person resorts in order to worship and pray. It is usually built on a higher level to which one ascends on a ladder or on stairs; and this is different from the Masjid (mosque).
Various names were given to describe it. It is also said that Mihrab is derived from the word Harb (war) because a worshipper is there as if he is fighting Satan, and considers that place a means of fighting Satan.
Mihrab in Islamic terminology means a place shaped as half a dome the height of a man and a half built in the direction of Qibla (direction of prayer to Makkah) for the imam to pray in. This was not known at the time of Prophet (Sallallahu Alaihi wa Sallam).
Al-Aloussi said in Rouh Al-Maani: "What is called Mihrab today in the mosque is innovated and was not known during the era of the Prophet (Sallallahu Alaihi wa Sallam)."
Furthermore, Jalaluddin Al-Suyooti wrote a booklet about it entitled: "Ialam Al-Arib Bi houdouthi Bidat Al-Maharib".
Al-Tahir Ibn Achour said in his book: "Al-Tahrir Wal-Tanweer' "The first Mihrab in Islam was the one built in the Prophet's mosque (Sallallahu Alaihi wa Sallam), during the era of the caliph Al-Walid Ibn Abdul Malik and Omar Ibn Abdul Aziz was the Emir of the Medina at the time."
As regards the ruling about the prayer in Al-Mihrab, the author of Kashaf Al-Qina said: "It is disliked for the Imam to pray in the Mihrab if it prevents the people praying behind to see him. It is as if there were curtains between him and them, except in the case of necessity, like if the mosque is too small or if it is crowded. In this case it is not disliked, and it is not disliked for the Imam to prostrate in the Mihrab if he is standing outside it."
Allah knows best.