The sign, written in French, says: Entry forbidden for non-Muslim. During the day, this applies to the centre of Moulay Idriss. At night to the whole town.
This town is named after the prominent Moroccan saint, Moulay Idriss. He was a descendant of Muhammad, of the fourth generation, and died by murder hand in 792. He had then spent five years in Morocco, in which time he had established a new dynasty, that survived his death. Moreover, he had founded the cities of Fez, and the one that was called after him.
Moulay Idriss is a holy town, even if little is ascribed to Moulay Idriss himself, without referring to Muhammad and Ali. The tomb and shrine of his are situated in an elevated position between two hills. The town is one big structure around the tomb, and many in the town live of commercial activities that follow in the trails of any large religious activity. Tourism on the other hand, is little welcomed, and non-Muslims are firmly asked to stay out of the town at night.
Overlooking the town is a way of getting around the regulations on not letting anyone outside the Muslim community, into any holy area. You climb up one of the hills (this is not considered as an unfriendly act), but you should seriously consider a guide, as many roads lead into blind alleys.