We have for review a judgment and sentence imposed after entry of a plea of no contest to one count of sale of cocaine. For the reasons set forth below, we affirm.
Following entry of his plea, appellant was sentenced to probation for 22 months, with the special condition that he serve 22 months in the Wakulla County Jañ. The statutory provision under which appellant was apparently sentenced, section 921.188, Florida Statutes (1993), specifies conditions under which the court may place a felony offender, whose presumptive sentence is 1 year and 1 day to 22 months, in the custody of a local detention facility as a condition of probation or community control.
Appellant asserts that he is the functional equivalent of a state prison inmate and is thus entitled to be awarded the same amount of gain time that he would receive if housed in a state prison. In this appeal, he prays for either of two forms of relief. First, he requests that this court reverse and remand with directions that he be permitted to withdraw his plea. As grounds, he asserts essentially that his plea was rendered involuntary and unknowing by the fact that the trial court failed to inform him that county jail authorities would consider him ineligible for gain time. Affirmance is warranted under this theory of relief given the fact that appellant failed to move to withdraw his plea at the trial level. Relief, if any, must come via a motion to withdraw the plea filed with the trial court, or via collateral attack by way of a rule 3.850 motion. See Robinson v. State, 373 So.2d 898 (Fla.1979); Simmons v. State, 645 So.2d 129 (Fla. 1st DCA 1994); Heatley v. State, 636 So.2d 153 (Fla. 1st DCA 1994); Isley v. State, 565 So.2d 389 (Fla. 5th DCA 1990).
Alternatively, appellant requests that this court direct the jail officials to award him any and all gain time due. Appellant is not challenging his sentence as illegal or invalid, nor is he requesting credit for time previously served. Rather, he is requesting to be awarded gain time earned or due on his present sentence. Appellant’s proper avenue of relief in this regard, however, is a petition for writ of mandamus, or habeas if applicable, filed with the circuit court after the exhaustion of administrative remedies. See e.g. Bland v. State, 664 So.2d 35 (Fla. 5th DCA 1995); Bowles v. State, 647 So.2d 1056 (Fla. 5th DCA 1994).
AFFIRMED.
ALLEN and WEBSTER, JJ., concur.