Did Islam have some rules of engagement in military conflicts, concerning women, children and old men? Were there any rules for not touching them after conquering a city or territory? Did Muhammad have such rules in his expeditions (military conflicts)?
Rules change in time - for example in the Ottoman Empire they took non-Muslim children by force from their parents, periodically, to make them soldiers. So I am interested about the rules in the times of Muhammad and a few centuries after him.