The Seljuk's developed the caravanserais or khans (Anatolia) or Ribat. These were charitable foundations providing travellers with three days of free shelter, food and entertainment (in some cases) as part of the charitable work emphasised by Islam towards travellers.
Summarised extracts from a full article:
Muslim Architecture under Seljuk Patronage (1038-1327) by Rabah Saoud
The Seljuk's developed the caravanserais or khans (Anatolia) or Ribat(1). These were charitable foundations providing travellers with three days of free shelter, food and entertainment (in some cases) as part of the charitable work emphasised by Islam towards travellers (Ibn Al-Sabil) and were set up at regular intervals, about 30km, along important trade routes in Asia Minor. Physically, these structures consisted of a courtyard pierced with Iwans and along its walls rooms were arranged according to their function involving lodging rooms, depots, guard rooms and stables.
This organisation is found in Rabat-i-Malik, a typical early Seljuk caravanserai in Iran which was built between 1078-1079 by Sultan Nasr(2) on the road of Bukhara and Samarkand. The structure resembled Abbassid desert palaces with a square plan guarded by strong walls which were buttressed by a number of semi circular towers. Later, this plan was altered leading to the emergence of two separate functional sections as in the case of Rabat Sharaf caravanserai built between 1114-1115 on the road between Nishapur and Merv (Godard, 1980) (figure 11), and Akcha Qala (11th century) about 80km north east of Merv. Both structures had two separate courtyards arranged on longitudinal axis with similar design principles of the four Iwan mosque and Madrassa. The first courtyard contained depots and stables while the second seemed to be reserved for accommodation (Hoag, 1987).
These spatial arrangements were also maintained in most of caravanserai in Anatolia which also contained two main sections, the first being evolved into a barrel vaulted hall used for sleeping arrangements. In some Hans, as in Sultan Han near Kayseri, this hall took the form of a basilica with an axial monumental portal (representing the central nave) opening into the second section of the building. This is the Sahn, a courtyard surrounded by one or two storey arcades comprising a number of rooms accommodating bathing services, storage, and stables as well as the staff working in the Khan such as physicians, cooks, and musicians. Seljuk caravanserais in Anatolia often had in the centre of their court a freestanding Masjid, "Kiosk" mosque. As with most of Muslim buildings, these were often provided with high quality architecture and décor which reaches its highest standards in the mosque and portal (Rice, 1979).