title: Error with wp_redirect
body: <p>I want to redirect admin users to a maintenance page (<a href="https://mysite/maintenance/" rel="nofollow noreferrer">https://mysite/maintenance/</a>), but firefox tells me the redirection is not correctly made</p>
  
  <pre><code>    add_action( 'template_redirect', 'custom_redirect' );
  function custom_redirect()
  {
      if (current_user_can('administrator')) {
          wp_redirect( home_url('/maintenance/') );
          exit;
      }
  }
  </code></pre>
  
  <p>Have you an idea ?</p>