Coldfusion WML Redirect

I built a short link system so I can use something like "http://www.experts-exchange.com?100001" as opposed to "http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/askQuestion.jsp", I have my parsing code in my Application.CFM, so I pick up if an ID was passed and check to see if it's a valid short link. I can redirect fine on a normal browser, and I need to be able to do this in WML. For some reason, when using my method on a handset I get a "500 Internal Server Error", damn WAP browsers and their lack of error handling :(

This is all I do if I find a valid short link

<cfif GetLink.RecordCount EQ 0>
      <cflocation url="invalid.cfm" addtoken="NO">
<cfelse>
      <cflocation url="#GetLink.URL#" addtoken="NO">
</cfif>

Anyone know any solid solutions for redirecting on a WAP browser? I've read conflicting articles about cflocation working and not working, and about it requiring an absolute path and others saying it needs a relative path for it to work in WML. Is there a tried and tested method I can use to redirect a WAP browser to a WML page from my Application.CFM?
KastionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrichmonCommented:
One problem may be that URL is a restricted word and should not be used as the variable name.

Other than that I don't know much about handsets
KastionAuthor Commented:
I've had problems with WML query strings before, it's really touchy, and needs &amp; instead of just an &, so we use LinkFreeze and use /'s to seperate all the variables. I don't think it's a problem with restricted names, "URL" is a field in a database and "GetLink" is my query so I don't think thats causing issues. This works on normal web browsers anyways, the short link/redirect work fine. I'm just getting a 500 internal server error on the phones, and WAP browsers output no debug info at all so it's near impossible to track it down.
KastionAuthor Commented:
I've found a solution. I do a <cfsavecontent> and write a dynamic WML page to a variable, then I write it to the page. I do my redirect through WML and just use coldfusion to determine where to redirect to.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrichmonCommented:
I'm glad you found a solution.  I can close this question for you and refund your points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.