Redirect Solution for Mobile Devices

There have been numerous posts concerning redirecting based on a mobile device. Since mobile devices are a huge part of the marketplace, there needed to be a better solution than a simple javascript redirect. I created the following formula which you place in the HTML Head Content and would like any feedback on how to make it better:

@If(@Like(@UpperCase(@GetHTTPHeader(“User-Agent”));“%PDA%”:“%PHONE%”:“%ANDROID%”:“%BLACKBERRY%”:“%MOBILE%”);@SetHTTPHeader(“Refresh”;“0; url="http://redirect-url-goes-here"”);“”)

Basically it looks at the HTTP User-Agent and does a redirect if it notices a particular pattern. Simply replace the redirect-url-goes-here with your own URL (or formulated URL) to your mobile-enabled site.