The appellant filed a petition for writ of habeas corpus claiming that he was illegally incarcerated in Palm Beach County. See Olcott v. State, 378 So.2d 303 (Fla.2d DCA 1979); Shead v. State, 367 So.2d 264 (Fla.3d DCA 1979). The trial court denied the petition on the grounds that it was without authority to grant the relief to which the appellant was apparently entitled, namely resentencing. In its order denying the petition the trial court noted that the appellant could file a motion for post-conviction relief in the court where he was originally sentenced in Dade County. We agree with the trial court.
The appellant was placed on probation for ten years by a circuit judge in Dade County and by a special condition of probation was ordered to serve six years in prison. The Third District Court of Appeal has held that such a “sentence” is illegal and requires resentencing. Shead v. State, supra. The trial court here, on an application for petition for writ of habeas corpus, was without authority to resentence the appellant or to order his release.1 Accordingly, the order denying the petition for writ of habeas corpus indicating that appellant *755should file a motion for post-conviction relief was correct and we affirm.
AFFIRMED.
LETTS, C. J., and GLICKSTEIN, J., concur.. An application for writ of habeas corpus in behalf of a prisoner who is authorized to apply for relief by motion pursuant to this rule, shall not be entertained if it appears that the applicant has failed to apply for relief, by motion, to the court which sentenced him, or that such court has denied him relief, unless it also appears that the remedy by motion is inadequate or ineffective to test the legality of his detention. Fla.R.Crim.P. 3.850.