[rt-users] Using RT from the Compaq iPAQ

Tony Aiuto tony at ics.com
Wed Oct 23 11:43:11 EDT 2002


>I was wondering if anyone has ever tweaked the way RT displays pages
>for the iPAQ's web browser?

Is it a WAP device, or does it try to do HTML?   If it needs WML,
then there is a lot of work to be done.

>Also, what is the easiest way to make one RT setup have different HTML
>pages for different devices?  I'd like to have RT display the stock
>HTML pages to non-handheld devices, and display the customized HTML to
>the iPAQs.

I do things like that with mod_rewrite rules in apache.  Something
like this may help

	RewriteEngine   on
	# Catch most WAP browsers
	RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR]
	# WinWAP, WAPjag
	RewriteCond %{HTTP_USER_AGENT} wap [OR]
	# Nokia emulators (sdk)
	RewriteCond %{HTTP_USER_AGENT} 7110
	# Rewrite!!
	RewriteRule  ^[\./](.*)$           /wml/index.wml        [L]

You could also switch on the user agent, if your browsers are HTML
but with constrained screens.

>Will I have to have two /rt2 directories that both access the same
>database?

With the above example, yes.  There would be a 'wml' directory with WML
versions of all the scripts located inside INSTALLDIR/WebRT/html A better
solution would have 'html' and 'wml' as siblings.

My favorite solution (from an elegance point of view) is to rewrite all
the pages to produce XML rather than HTML, and provide XSL style sheets
for each to convert from the XML to the HTML page.  You would specify
different style sheets depending on the browser.  The down side
is that you often have to do the XSL translation on the server side
rather than letting the client do it.  This eats CPU.




More information about the rt-users mailing list