I have done a module for Apache Web Server that recognizes the device and redirect to the correct contents (WML, XHTML etc.) you have defined. Also it's possible to resize dynamically the images depends of the device characteristics. Do you think this module could be useful? The module is Open Source, and the Device Repository is WURFL
For more information: http://www.idelfuschini.it/apache-mobile-filter.html