1. Prayer is not allowed in a ghasbi place. The permission from the owner may be either explicit or implied.
Further Explanation of Rule No. 1:
If someone lives in a rented house and, for one reason or other, is prevented from paying the rent to the owner, then he should seek the owner's permission to live in that house without paying him any rent.
If the owner is not known, or his whereabouts are not known, then the property comes under the category 'mal majhul al-malik' (a thing the owner of which is not known). Such things become the property of the Imam (A.S.), and in his ghaybah, the Mujtahid has authority upon such things.
Therefore, such cases should be referred to the Mujtahid for his decision.
2. The place of sajdah must be tahir. Standing and sitting places may be non-tahir, provided there is no possibility of the najasah extending to the body or the clothes of the prayer.
3. It is not allowed to pray in a place where the prayer cannot be finished properly, or where there is danger to the life, for example on a busy road during rush hour.
4. The place of prayer should not be unstable, like a spring mattress, etc.
5. There should be space sufficient enough to stand properly and to do ruku’ and sajdah properly.
6. If a man and a woman are praying in the same place, woman must stand at least one span (better, 15 feet) behind the man, or there should be a curtain or wall between them.
7. The place where forehead is put in sajdah should not be more than four fingers (about 2 ½ inches) lower or higher than the place where the toes and knees are put.
It is stressed that the prayer should be performed in a Masjid. Masjids in order of preference are:
(a) Masjid al-Haram (around the Ka’ba) - one prayer there = 1,00,000 prayers.
(b) Masjid al-Nabi (Madina) - one Prayer there = 10,000 prayers.
(c) Masjid al-Kufa and Bayt al-Maqdis - one prayer there = 1,000 prayers.
(d) Masjid al-Jami’ - one prayer there = 100 prayers elsewhere.
(e) Masjid of the market- one prayer there = 12 prayers elsewhere.
For women, their home is better than the Masjid.
The Prophet has said: Three things will complain before Allah:
1. The Masjid which is neglected and nobody comes to pray there;
2. An ‘Alim, among the people who do not know the religion; and - .
3. A Qur’an put in a place, from which nobody recites ever, and which remains covered with dust. Also, the Prophet has said: "There is no prayer for a neighbour of the Masjid, but in a Masjid."
It is not liked to pray in a dirty place, or butchery, or in a place where fire is burning, or when there is fire before a person, or where there are photos of human beings or animals, or with open Quran before him or any open book. It is also makruh to pray in burial ground, or on a grave, or behind a grave, or between two graves, or where there is a human being facing him. It is makruh to pray in a bath-house (hammam), or on roads, or facing an open door, or in a salty place, or in a room wherein someone is junub.