On Mon, May 25, 2015 at 11:30 AM, Frank Lehmann <frank-lehm...@freenet.de>
wrote:

> Hi helpers,
>
> i want to rewrite my url when a mobile user reaches my homepage.
>
> I found this condition on the web after several searchings.
>
> But it will not work.
> All other condition also not working, i have tested many conditions.
>
> How can i rewrite a url when a mobile client is getting my homepage ?
>

Hassan mentioned one way, that's the UrlRewrite filter.  Since you're on
Tomcat 8, there's also a rewrite filter built-in.  It uses a similar syntax
to HTTPD, which is probably what you found posted on the internet.

https://tomcat.apache.org/tomcat-8.0-doc/rewrite.html


> Thanks for help.
>
>
> RewriteCond %{HTTP_USER_AGENT}
> ("android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|mobile|palmos|webos")
> [NC]
> RewriteRule ^(.+)$ http://www.dashandwerk.net/mobile/ [L]
>

Where / how did you attempt to configure this?

Dan



>
> My environment.
>
> Tomcat 8

Windows 2012 R2
> Homepage under folder webapps/root
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to