A judge says Cosby will be confined to the same suburban Philadelphia mansion where jurors concluded he drugged and molested a Temple University women’s basketball administrator, ordering him to be outfitted with a GPS ankle bracelet to monitor compliance.

Until sentencing, Judge Steven O’Neill ruled Friday, the 80-year-old comedian may leave his house only to meet with his lawyers or go to the doctor, and he must get permission first.

It was the latest sign that Cosby’s past — a sordid double life that gave the lie to his carefully cultivated image as America’s Dad — had finally caught up with him.

Cosby was convicted Thursday of three counts of aggravated indecent assault and now faces the prospect of spending the rest of his life behind bars. His team blasted the retrial as a “public lynching” and began looking ahead to an appeal.

Andrew Wyatt, Cosby’s Spokesperson, told Eyewitness news in an interview that, “He’s not sad. He’s not walking around with his head bowed. He’s not miserable. He just knows that he did not do these things.”

Cosby’s publicist, Ebonee Benson also took part in the interview saying that their team is working quickly to appeal the guilty verdict.

“The fight hasn’t stopped.” It’s just moving from trial ending to the next phase,” said Benson.

Lawyers not connected with the case said the defense might have a winning argument.

Prosecutors put five other women on the stand to testify that they, too, were abused by the former TV star, but the strategy that helped them secure a conviction could also serve as a template for his lawyers seeking to overturn the jury’s verdict.

Christopher Adams, a defense attorney whose clients have included former NBA star Jayson Williams, said the judge’s decision to allow the “prior bad acts” testimony could have tainted the jury.

“It’s one thing if they looked at one or two, but five? He wasn’t charged with being a serial assaulter,” he said.

Former federal prosecutor David Axelrod, now in private practice in Philadelphia, agreed that Cosby’s team has a shot at convincing an appeals court that the judge went too far.

Chief accuser Andrea Constand, meanwhile, took to Twitter to thank prosecutors in her first comment on the verdict.

“Truth prevails,” she wrote.

A very profound and heartfelt thank you to the Commonwealth of PA, Montgomery County, for their service and sacrifices.Congratulations.Truth prevails.

Constand, now 45, first went to police in 2005 with her allegation that Cosby had knocked her out with three blue pills he called “your friends” and then penetrated her with his fingers as she lay immobilized, unable to resist or say no. But the district attorney at the time halted a police investigation after just four weeks, declaring the case too weak to be prosecuted.

Many on social media applauded the #MeToo movement as a factor in propelling this case, involving a high profile figure, to the point of conviction. Cosby’s team disagrees.

The current district attorney, Kevin Steele, who made the decision to retry Cosby after last year’s hung jury, said in a statement Friday he hoped the case would “pave the road for future victims to come forward to law enforcement and have their allegation investigated.”