
857 So.2d 358 (2003)
Louis Jeffery HOGGS, Appellant,
v.
STATE of Florida, Appellee.
No. 5D03-2446.
District Court of Appeal of Florida, Fifth District.
October 24, 2003.
*359 Louis Jeffery Hoggs, Arcadia, Pro Se.
Charles J. Crist, Jr., Attorney General, Tallahassee, and Pamela J. Koller, Assistant Attorney General, Daytona Beach, for Appellee.
MONACO, J.
Louis Jeffrey Hoggs appeals the summary denial by the trial court of his Rule 3.850 motion. Mr. Hoggs asserts that his trial counsel was ineffective for failing to properly advise him regarding the length of the sentence to which he was subject. We affirm because his motion is legally insufficient.
Mr. Hoggs was charged with two counts of sale of cocaine. He had been offered a plea bargain amounting to nine years of imprisonment in exchange for guilty pleas to both, but the offer had long expired by the time the alleged ineffective actions of counsel occurred. He originally intended to plead guilty to one of the counts and to go to trial on the other. He asserts, however, that his attorney advised him to enter a "straight up" plea to the count to be tried, suggesting that it was in his best interest to do so, rather than to plead to one count and go to trial with respect to the second count. The maximum sentence faced by the appellant was 30 years imprisonment. Mr. Hoggs alleges that his attorney told him shortly before trial that if he pled to both counts, he would likely only receive nine years, as had previously been offered by the state. He then pled to both counts, but was sentenced to eighteen years incarceration.
Mr. Hoggs claims that his plea was involuntary as it was induced by the misadvice of counsel. There are two things wrong with his position. First, he does not allege, as he must, that but for his counsel's advice, he would have gone to trial. See Hill v. Lockhart, 474 U.S. 52, 59, 106 S.Ct. 366, 88 L.Ed.2d 203 (1985); see also Harris v. State, 801 So.2d 973 (Fla. 2d DCA 2001). Instead, he suggests that but for his counsel's advice, he would have accepted the state's plea offer of nine years. The plea offer, however, had expired six months before he received the advice he now questions, and was not available to him. In fact, the plea offer expired before conflict counsel whose advice he questions was even appointed. At no point has he indicated that he would have gone to trial as the alternative to entry of a no contest plea.
Secondly, Mr. Hoggs failed to allege that he had a viable defense. We have held on a number of occasions that such an allegation is a prerequisite to seeking withdrawal of a guilty plea or a plea of no contest due to ineffective assistance of counsel. See Grosvenor v. State, 816 So.2d 822 (Fla. 5th DCA), review granted, 826 So.2d 992 (Fla.2002)(certifying conflict with Cousino v. State, 770 So.2d 1258 (Fla. 4th DCA 2000), and Mason v. State, 742 So.2d 370 (Fla. 1st DCA 1999); see also Gould v. State, 826 So.2d 1101 (Fla. 5th DCA 2002); Maples v. State, 804 So.2d 599 (Fla. 5th DCA 2002).
AFFIRMED.
SHARP, W. and TORPY, JJ., concur.
