19th Century France: The Fatherhood of Regulation
Prostitution was legal, but regulated, in nineteenth-century Paris. It was recognized as an important part of the fabric of a functioning society, but viewed as a necessary evil that should be isolated and circumscribed as much as possible.
Many regulations were erected as a way of attempting to erase prostitution from everyday view. Regulating how streetwalkers must dress and behave, forbidding madames from opening brothels in close proximity to religious buildings or government buildings, and requiring brothels to be quite discreet-looking from the outside with no prostitutes sitting in windows all were ways of restricting prostitution to very specific places and times. Finally, brothels were placed under close government scrutiny and police supervision.
Other regulations arose from the need to protect the population's health. Prostitutes were tolerated in much the same way sewers were: enabling the "social body to excrete excess seminal fluid," but seen as unhygenic and putrid. In 19th century symbolism, prostitutes were often compared to corpses; from this perspective, regulating prostitution was imperative. 
 Corbin, Alain. 1986. “Commercial Sexuality in Nineteenth-Century France: A System of Images and Regulations.” Representations, pp. 209-219.