title: NextJs rewrites produce localhost redirected you too many times error
body: <p>The following is my next.config.js:</p>
  <pre><code>// next.config.js
  
  module.exports = {
    async rewrites() {
      return [
        {
          source: '/results',
          destination: 'https://mywebsite.com/results',
        },
      ];
    },
  };
  </code></pre>
  <p>According to Nextjs rewrites documentation (<a href="https://nextjs.org/docs/api-reference/next.config.js/rewrites#rewriting-to-an-external-url" rel="nofollow noreferrer">https://nextjs.org/docs/api-reference/next.config.js/rewrites#rewriting-to-an-external-url</a>), upon visiting  <a href="https://nextjswebsite.com/results" rel="nofollow noreferrer">https://nextjswebsite.com/results</a>, the contents of the page should be rewritten with contents of <a href="https://mywebsite.com/results" rel="nofollow noreferrer">https://mywebsite.com/results</a>.</p>
  <p>However, I end up getting &quot;localhost redirected you too many times&quot;.</p>
  <p>Any ideas what causes the error?</p>