I wondering about the best way to redirect mobile users from my drupal site to a seperate mobile site on a different url.
I’ve looked at mobile tools but it seems a little to heavy for my needs. I’ve done this with flat html/php files using a mobile detect script and it works perfectly and is very straight forward.
I’m supposing that I can’t use .htaccess for this and any solution has to come from drupal. But I’m wondering about where to put the code so that it’s executed first.
Any ideas/tips/help much appreciated.
Your best bet would be to write a small module and implement
hook_init()which happens before the page is even built.