title: $_SERVER['DOCUMENT_URI'] is empty
body: <p>I migrated servers and now this variable <code>$_SERVER['DOCUMENT_URI']</code> stopped working, what can I do?</p>
  <p>I'm temporarily using this solution: <code>$uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2)[0];</code> but there's a lot of code that uses <code>$_SERVER['DOCUMENT_URI']</code> and I don't want to be changing all of that.</p>