Bam Margera is back on the road to recovery, but this time ... they're gonna be rejiggering things to avoid yet another episode of escape déjà vu.
Sources connected to Bam tell TMZ ... earlier this week the former 'Jackass' star returned to his court-ordered rehab program, except there are some major changes going forward that'll hopefully benefit him and everyone in his orbit.
We're told Bam's team got his plan restructured a bit through a judge ... with the major tweak being that he no longer has to be in an in-patient facility, which clearly was not working.
Just a reminder ... Bam has fled rehab multiple times in Florida over the past few months, only to be located by law enforcement and dragged back to continue his treatment. The fact it keeps happening over and over meant a new approach was needed ... so now, our sources say they're gonna try an outpatient approach and pray for different results.
With that said, the restrictions placed on Bam will continue to be strict ... including the fact he must remain sober, attend classes and continue seeing a psychiatrist -- same as if he were in the actual facility.
If you're wondering how exactly things turned since last time -- when Bam was spotted at a bar in Florida -- this as he was apparently considering fleeing the state -- we're told his loved ones were able to convince him to abandon that plan and see this thing through to the end.