So-called sharing-economy companies such as Uber, Airbnb and Task Rabbit are posing policy headaches for governments around the world. Their argument that they should be exempt from existing regulations because their services are ordered over the Web does not make much sense, but it provides a fig leaf for politicians seeking campaign contributions from these highly capitalized newcomers.

For those who have missed the hype, “sharing economy” refers to a wide variety of companies that use the Web to connect consumers and providers. While there is no reliable data on its size, in part because it is not well defined, Airbnb now boasts far more room listings than Hilton or Marriott, and Uber has quickly grown to be the largest taxi service in the world.

Part of the response to the innovations associated with these companies should be to modernize regulations. It is reasonable to regulate taxi services in ways that ensure that cars are safe and drivers are competent and responsible. It is also reasonable to regulate rented rooms to ensure they are not fire traps. Similarly, both should be regulated in ways that ensure access to the handicapped and prevent discrimination. In addition, employees in these companies should be covered by workers’ compensation and protected by minimum wage and overtime rules.

These efforts will require a rewriting of existing regulations, many of which were put in place to protect the existing companies in the industry rather than serve a legitimate public purpose. This sort of modernization is clearly a doable task from a technical standpoint, although sharing-economy companies will undoubtedly use their money to try to block the imposition of rules that put them on an equal footing with their old-fashioned competitors.

In addition to a level-the-playing-field approach, we can also treat the sharing- economy companies to some new competition: a public option. The idea is that governments can set up public sites that would provide the same services as the sharing economy companies. The difference would be that the public sites would cut out the middleman. They would be set up to benefit customers and service providers, with the government charging only the fees necessary to cover costs.

For example, a taxi service could allow for drivers to register in the same way as they do for Uber and Lyft. Customers could use an app to order their services just as they do with Uber and Lyft. The difference would be that the public service would likely take out a lower share of the fare than its for-profit competitors. If its design were effective, only drivers who felt like being ripped off would work for Uber and Lyft.