title: Nginx mobile redirection fails
body: <p>When I go to <a href="http://domain.com" rel="nofollow">http://domain.com</a> the mobile redirection works but when I go to some other pages it fails and serves the original link.</p>
  
  <pre><code>       location / {
  
          if ($http_user_agent ~* "(iPhone|iPod|android|blackberry)" ) {
              return 301 $scheme://$host/m$request_uri;
          }
  
         index index.php;
  
      }
  
      location /m/ {
          index index.php;
  
      }
  </code></pre>