title: PHP header location redirecting to real port instead of fake one
body: <p>I have a running nginx web server using PHP 7.4 (FPM) using Ubuntu 20.04. The web server runs on port 2080 and 2443, and they are port forwarded on port 2443 LAN 443 WAN.</p>
  <p>I have a PHP script that should redirect me to another page of my website, but it redirects me on a page that uses port 2443 which is inaccesible since i need 443. I tried all possible things but it won't work and it will still redirect me to port 2443.
  Note that i cannot use port 443 locally on my nginx server, so that isn't a option.</p>
  <p>I have tried:</p>
  <pre><code>header('Location: https://domain.tld:443/page');
  header('Location: https://domain.tld/page');
  header('Location: https://domain.tld./page');
  </code></pre>
  <p>however with no success as it's redirecting me on <a href="https://domain.tld:2443/page" rel="nofollow noreferrer">https://domain.tld:2443/page</a> .</p>
  <p>So how do i fix this?</p>