Is there now a way of detecting the browser’s user agent, so we can redirect them at the server level? A typical use would be to detect mobile browsers and redirect them to a mobile version of the page.
Yes, I know it’s easy enough to do in JavaScript. You can also use the Meta Refresh tag in the header. Both of these methods, however, require the user to load the original page to some extent, before they’re forwarded on. What we’re looking for is something like what’s in Apache.
In Apache, you can add rules to the mod_rewrite file to redirect browsers with specific user agent strings, like so:
RewriteEngine on RewriteCond %{HTTP_USER_AGENT} iPhone RewriteCond %{HTTP_USER_AGENT} iPod RewriteRule .* http://mobile.myurl.com/ http://mobile.myurl.com/ [R]
Nice and clean. And fast! It would be so much easier if we could do something like this in Domino.
HTTP Response Headers would seem to be the way to go, but they only have the ability to match on an incoming URL pattern in Domino 8.5. Is there something in 9 that would let it match on the browser’s user agent, a la Apache?