Mayor Bill de Blasio and other officials denouncing “poor door” entrances for subsidized tenants in luxury buildings actually voted in favor of a measure that made such separation possible, a Post review found.

When the lengthy text of a zoning resolution was amended by the City Council in July 2009, then-Councilman de Blasio — who arrived late to the meeting — was among the majority who voted “Aye.”

One provision said developers of market-rate condos could include affordable units on site, instead of off site, while allowing for the separation of a number of services that included the entrances.

But de Blasio’s vote didn’t stop City Hall officials last week from putting the blame for the controversial Extell Development project at 40 Riverside Blvd. — which will have a separate entrance for subsidized tenants — solely on former Mayor Mike Bloomberg’s team.

“The previous administration changed the law to enable this kind of development,” City Hall spokesman Wiley Norvell said last week.

Asked about the role of de Blasio and the council in approving the 2009 measure, administration officials said it was a single provision in a 104-page zoning change, which was otherwise beneficial.

“The resolution at issue was focused on helping more low-income New Yorkers buy their own homes and expanding affordable housing,” said Norvell.

He added that the administration is working on amending the zoning language to prevent future developments with similar split entrances.

“Now that we are in a position to bring those rules fully into line with our priorities and values, we will make the necessary changes to ensure families in affordable housing are treated equitably,” he said.

Among the other elected officials who voted in favor of the 2009 zoning changes are current Manhattan Borough President Gale Brewer and Public Advocate Letitia James.

The two were among those who took part in a press conference on the steps of City Hall this past Friday condemning the prior administration for signing off on the project.

Asked about her vote, Brewer also said the two-doors effect emerged from a “small” provision in a “long” resolution.

“I doubt any of us on the council were aware of that provision; I certainly wasn’t,” she said. “A separate door on a building that benefits one specific project evades the spirit of our city — and we are working to close this loophole.”

Like the administration, James’ spokeswoman Aja Davis pointed to the overall benefits of the zoning changes approved within the 2009 measure, calling Extell’s separation of units by income an “exploitation” of the amendment.

Additional reporting by Amber Jamieson