title: wp_is_mobile and wp_redirect are not working
body: <p>I am encountering some problems with the wp_redirect and wp_is_mobile functions, on my Wordpress.</p>
  
  <p>I have to pages :</p>
  
  <p>The mobile form page, that is working fine :</p>
  
  <pre><code>&lt;?php
    if (!is_mobile())
    {
      wp_redirect( 'MY URL', 301 ); // Redirect to the non-mobile version of the form
      exit;
    }
  ?&gt;
  // My html form
  </code></pre>
  
  <p>The non-mobile form page, that won't redirect :
  (For securities reasons, I currently removed the redirection script)</p>
  
  <pre><code>&lt;?php
    if (wp_is_mobile())
    {
      wp_redirect( 'MY URL', 301 ); // Redirect to mobile version of the form
      exit;
    }
  ?&gt;
  // My html form
  </code></pre>
  
  <p>BUT... the local (WAMP) version of this page is working.</p>
  
  <p>Also, i tried to make a page without any HTML code, where the redirecting does work in both cases :</p>
  
  <pre><code>&lt;?php
   if (is_mobile())
    {
     wp_redirect( 'MY URL', 301 );
     exit;
    }
   else
    {
     wp_redirect( 'MY URL', 301 );
     exit;
    }
  ?&gt;
  </code></pre>
  
  <p>Thank you for your help.</p>