title: Nginx redirect/rewrite url
body: <p>I'm using nginx/1.18.0 (Ubuntu)</p>
  <p>I want to achieve the following</p>
  <p>From:</p>
  <pre><code>https://www.testsite.com/mypath
  </code></pre>
  <p>to</p>
  <pre><code>http://myip:9990/index.html
  </code></pre>
  <p>This is what I have now, but it's not working for some reason</p>
  <pre><code>location /mypath{
      return 301 http://myip:9990/index.html;
  }
  </code></pre>
  <p>I'm very new to ngnix, thanks for helping.</p>