Detect mobile with rewrite.