Here are more facts concerning the true situation of Jerusalem in science and history.
Jerusalem was never capital all along its Islamic history
Why didn’t it ever serve as a capital city or even an important religious and political city at any time in Islamic history? When the Arab empire expanded by a deep process of imperialism and colonialism, and the Umayyad dynasty was established (661-750) and later on Abbasid dynasty (850-1250), Damascus and Baghdad respectively were established as the capitals, but not Jerusalem. When the Ottoman Empire established (1299-1922) and controlled the Arab lands including the land of Israel (1517-1919), it marked Istanbul (Constantinople) as its capital and not Jerusalem.
The Ottomans, like the Umayyads and the Abbasids were good Muslims, and they followed the Islamic Scripture properly. Does it sound logical that they did not know about the Mosque Muhammad had ostensibly built in Jerusalem? Why Istanbul, Damascus, and Baghdad and not Jerusalem? The fact is that there was nothing important in Jerusalem.
In between there were the Fatimid Caliphate (al-Fāṭimīyūn), an Isma’ili Shi’ite dynasty (909-1171) with its capital in Cairo; the Ayyubid dynasty (al-Ayyūbīyūn) of Kurdish origin (1174-1250), that ruled much of the Middle East during the 12th and 13th centuries, with its capital in Cairo (1174–1250) and Allepo (1250–1260); and Mamlūk Sultanate (Sulṭanat al-Mamālīk) (1250-1517) that ruled over Egypt, the Levant and Hijaz, with its capital in Cairo.
What is important that all these could have established their capital in Jerusalem, following Muhammad’s teaching and commandment, but they did not, as there was no legacy at all of Muhammad concerning Jerusalem. Moreover, Salah ad-Din al-Ayyubi conquered Jerusalem from the Crusaders, cleaned it up from their institutions, and still left the city after calling the Jews to return to it. (Click to Article)